@Override protected void runChild(FrameworkMethod method, RunNotifier notifier) { super.runChild(method, notifier); if (method.getAnnotation(Ignore.class) == null) { serviceLocator.destroy(); methodTestNeeds.destory(); methodTestNeedContainers.destory(); } }
@Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { of(beanFactory.getBeanDefinitionNames()) .parallel() .map(beanFactory::getBeanDefinition) .forEach(p -> p.setLazyInit(true)); methodTestNeeds.inject(serviceLocator); methodTestNeedContainers.inject(serviceLocator); if (classTestNeeds != null) { classTestNeeds.inject(serviceLocator); } if (classTestNeedContainers != null) { classTestNeedContainers.inject(serviceLocator); } }
classTestNeeds.init(); classTestNeedContainers = new TestNeedContainers(testContext, javaClass.getSimpleName(), NeedScope.CLASS); classTestNeedContainers.init(); classTestNeedContainers.destory();
methodTestNeeds.init(); methodTestNeedContainers = new TestNeedContainers(testContext, methodName, NeedScope.METHOD); methodTestNeedContainers.init();
classTestNeeds.init(); classTestNeedContainers = new TestNeedContainers(testContext, javaClass.getSimpleName(), NeedScope.CLASS); classTestNeedContainers.init(); classTestNeedContainers.destory();
TestNeedContainers testContainerNeeds = new TestNeedContainers(testContext, testContext.getName(), NeedScope.METHOD); testContainerNeeds.init(); descriptor.setTestContainerNeeds(testContainerNeeds);
methodTestNeeds.init(); methodTestNeedContainers = new TestNeedContainers(testContext, method.getName(), NeedScope.METHOD); methodTestNeedContainers.init();
@Override protected void runChild(FrameworkMethod method, RunNotifier notifier) { super.runChild(method, notifier); if (method.getAnnotation(Ignore.class) == null) { SpringBootDescriptor descriptor = APPLICATION_DESCRIPTORS.get(application); clientInstance.close(); serverInstance.stop(); descriptor.getTestNeeds().destory(); descriptor.getTestContainerNeeds().destory(); } }
@Override protected void runChild(FrameworkMethod method, RunNotifier notifier) { super.runChild(method, notifier); if (method.getAnnotation(Ignore.class) == null) { clientContext.getInstance().close(); serverContext.getInstance().stop(); interceptor.getMethodTestNeeds().destory(); interceptor.getMethodTestNeedContainers().destory(); } }