@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); } }
@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(); } }