From 998f6af290462fe8ddf167ebf32d2d0dca6c7290 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Tue, 23 Jul 2019 11:28:31 +0200 Subject: [PATCH] Move integration tests to dedicated module This commit moves the dependency management and test source files related to integration tests to a dedicated module. This allows us to focus the root project on building the Spring Framework. See gh-23282 --- .gitignore | 1 + build.gradle | 21 +++---------------- integration-tests/integration-tests.gradle | 20 ++++++++++++++++++ .../src}/test/java/.gitignore | 0 .../src}/test/java/com/foo/Component.java | 0 .../foo/ComponentBeanDefinitionParser.java | 0 .../ComponentBeanDefinitionParserTests.java | 0 .../java/com/foo/ComponentFactoryBean.java | 0 .../com/foo/ComponentNamespaceHandler.java | 0 ...NamespaceHandlerScopeIntegrationTests.java | 0 ...visorAutoProxyCreatorIntegrationTests.java | 0 .../EnableCachingIntegrationTests.java | 0 ...ionScannerJsr330ScopeIntegrationTests.java | 0 ...efinitionScannerScopeIntegrationTests.java | 0 .../EnvironmentSystemIntegrationTests.java | 0 ...ConfigurerEnvironmentIntegrationTests.java | 0 .../core/env/scan1/Config.java | 0 .../core/env/scan1/DevConfig.java | 0 .../core/env/scan1/ProdConfig.java | 0 .../core/env/scan2/DevBean.java | 0 .../core/env/scan2/ProdBean.java | 0 .../support/BeanFactoryTypeConverter.java | 0 .../expression/spel/support/Spr7538Tests.java | 0 ...ansactionalAnnotationIntegrationTests.java | 0 ...TransactionManagementIntegrationTests.java | 0 .../ProxyAnnotationDiscoveryTests.java | 0 .../test/resources/META-INF/spring.handlers | 0 .../test/resources/META-INF/spring.schemas | 0 .../resources/com/foo/component-config.xml | 0 .../src}/test/resources/com/foo/component.xsd | 0 .../src}/test/resources/log4j2-test.xml | 0 ...ceHandlerScopeIntegrationTests-context.xml | 0 ...toProxyCreatorIntegrationTests-context.xml | 0 .../ltw/ComponentScanningWithLTWTests.xml | 0 ...mentSystemIntegrationTests-context-dev.xml | 0 ...entSystemIntegrationTests-context-prod.xml | 0 ...ironmentSystemIntegrationTests-context.xml | 0 .../transaction/annotation/enable-caching.xml | 0 .../springframework/util/testlog4j.properties | 0 .../web/util/testlog4j.properties | 0 settings.gradle | 1 + 41 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 integration-tests/integration-tests.gradle rename {src => integration-tests/src}/test/java/.gitignore (100%) rename {src => integration-tests/src}/test/java/com/foo/Component.java (100%) rename {src => integration-tests/src}/test/java/com/foo/ComponentBeanDefinitionParser.java (100%) rename {src => integration-tests/src}/test/java/com/foo/ComponentBeanDefinitionParserTests.java (100%) rename {src => integration-tests/src}/test/java/com/foo/ComponentFactoryBean.java (100%) rename {src => integration-tests/src}/test/java/com/foo/ComponentNamespaceHandler.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/context/annotation/jsr330/ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/context/annotation/scope/ClassPathBeanDefinitionScannerScopeIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/core/env/scan1/Config.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/core/env/scan1/DevConfig.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/core/env/scan1/ProdConfig.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/core/env/scan2/DevBean.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/core/env/scan2/ProdBean.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/expression/spel/support/BeanFactoryTypeConverter.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/expression/spel/support/Spr7538Tests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java (100%) rename {src => integration-tests/src}/test/java/org/springframework/transaction/annotation/ProxyAnnotationDiscoveryTests.java (100%) rename {src => integration-tests/src}/test/resources/META-INF/spring.handlers (100%) rename {src => integration-tests/src}/test/resources/META-INF/spring.schemas (100%) rename {src => integration-tests/src}/test/resources/com/foo/component-config.xml (100%) rename {src => integration-tests/src}/test/resources/com/foo/component.xsd (100%) rename {src => integration-tests/src}/test/resources/log4j2-test.xml (100%) rename {src => integration-tests/src}/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml (100%) rename {src => integration-tests/src}/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml (100%) rename {src => integration-tests/src}/test/resources/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml (100%) rename {src => integration-tests/src}/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-dev.xml (100%) rename {src => integration-tests/src}/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-prod.xml (100%) rename {src => integration-tests/src}/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml (100%) rename {src => integration-tests/src}/test/resources/org/springframework/transaction/annotation/enable-caching.xml (100%) rename {src => integration-tests/src}/test/resources/org/springframework/util/testlog4j.properties (100%) rename {src => integration-tests/src}/test/resources/org/springframework/web/util/testlog4j.properties (100%) diff --git a/.gitignore b/.gitignore index a9136e7ebc..a098e24827 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ classes/ /build buildSrc/build /spring-*/build +/integration-tests/build /src/asciidoc/build target/ diff --git a/build.gradle b/build.gradle index 11c9997e6e..ce87ff0fa8 100644 --- a/build.gradle +++ b/build.gradle @@ -179,7 +179,8 @@ configure(allprojects) { project -> ] as String[] } -configure(subprojects.findAll { (it.name != "spring-core-coroutines") } ) { subproject -> +configure(subprojects.findAll { (it.name != "spring-core-coroutines" + && it.name != "spring-integration-tests") } ) { subproject -> apply from: "${gradleScriptDir}/publish-maven.gradle" jar { @@ -260,23 +261,7 @@ configure(rootProject) { // Don't publish the default jar for the root project configurations.archives.artifacts.clear() - dependencies { // for integration tests - testCompile(project(":spring-aop")) - testCompile(project(":spring-beans")) - testCompile(project(":spring-context")) - testCompile(project(":spring-core")) - testCompile(project(":spring-expression")) - testCompile(project(":spring-jdbc")) - testCompile(project(":spring-orm")) - testCompile(project(":spring-test")) - testCompile(project(":spring-tx")) - testCompile(project(":spring-web")) - testCompile("javax.inject:javax.inject:1") - testCompile("javax.resource:javax.resource-api:1.7.1") - testCompile("javax.servlet:javax.servlet-api:3.1.0") - testCompile("org.aspectj:aspectjweaver:${aspectjVersion}") - testCompile("org.hsqldb:hsqldb:${hsqldbVersion}") - testCompile("org.hibernate:hibernate-core:5.1.17.Final") + dependencies { asciidoctor("io.spring.asciidoctor:spring-asciidoctor-extensions:0.1.3.RELEASE") } diff --git a/integration-tests/integration-tests.gradle b/integration-tests/integration-tests.gradle new file mode 100644 index 0000000000..c411245ee1 --- /dev/null +++ b/integration-tests/integration-tests.gradle @@ -0,0 +1,20 @@ +description = "Spring Integration Tests" + +dependencies { + testCompile(project(":spring-aop")) + testCompile(project(":spring-beans")) + testCompile(project(":spring-context")) + testCompile(project(":spring-core")) + testCompile(project(":spring-expression")) + testCompile(project(":spring-jdbc")) + testCompile(project(":spring-orm")) + testCompile(project(":spring-test")) + testCompile(project(":spring-tx")) + testCompile(project(":spring-web")) + testCompile("javax.inject:javax.inject:1") + testCompile("javax.resource:javax.resource-api:1.7.1") + testCompile("javax.servlet:javax.servlet-api:4.0.1") + testCompile("org.aspectj:aspectjweaver:${aspectjVersion}") + testCompile("org.hsqldb:hsqldb:${hsqldbVersion}") + testCompile("org.hibernate:hibernate-core:5.1.17.Final") +} \ No newline at end of file diff --git a/src/test/java/.gitignore b/integration-tests/src/test/java/.gitignore similarity index 100% rename from src/test/java/.gitignore rename to integration-tests/src/test/java/.gitignore diff --git a/src/test/java/com/foo/Component.java b/integration-tests/src/test/java/com/foo/Component.java similarity index 100% rename from src/test/java/com/foo/Component.java rename to integration-tests/src/test/java/com/foo/Component.java diff --git a/src/test/java/com/foo/ComponentBeanDefinitionParser.java b/integration-tests/src/test/java/com/foo/ComponentBeanDefinitionParser.java similarity index 100% rename from src/test/java/com/foo/ComponentBeanDefinitionParser.java rename to integration-tests/src/test/java/com/foo/ComponentBeanDefinitionParser.java diff --git a/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java b/integration-tests/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java similarity index 100% rename from src/test/java/com/foo/ComponentBeanDefinitionParserTests.java rename to integration-tests/src/test/java/com/foo/ComponentBeanDefinitionParserTests.java diff --git a/src/test/java/com/foo/ComponentFactoryBean.java b/integration-tests/src/test/java/com/foo/ComponentFactoryBean.java similarity index 100% rename from src/test/java/com/foo/ComponentFactoryBean.java rename to integration-tests/src/test/java/com/foo/ComponentFactoryBean.java diff --git a/src/test/java/com/foo/ComponentNamespaceHandler.java b/integration-tests/src/test/java/com/foo/ComponentNamespaceHandler.java similarity index 100% rename from src/test/java/com/foo/ComponentNamespaceHandler.java rename to integration-tests/src/test/java/com/foo/ComponentNamespaceHandler.java diff --git a/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java diff --git a/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java diff --git a/src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java b/integration-tests/src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/cache/annotation/EnableCachingIntegrationTests.java diff --git a/src/test/java/org/springframework/context/annotation/jsr330/ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests.java b/integration-tests/src/test/java/org/springframework/context/annotation/jsr330/ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/context/annotation/jsr330/ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/context/annotation/jsr330/ClassPathBeanDefinitionScannerJsr330ScopeIntegrationTests.java diff --git a/src/test/java/org/springframework/context/annotation/scope/ClassPathBeanDefinitionScannerScopeIntegrationTests.java b/integration-tests/src/test/java/org/springframework/context/annotation/scope/ClassPathBeanDefinitionScannerScopeIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/context/annotation/scope/ClassPathBeanDefinitionScannerScopeIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/context/annotation/scope/ClassPathBeanDefinitionScannerScopeIntegrationTests.java diff --git a/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java b/integration-tests/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/core/env/EnvironmentSystemIntegrationTests.java diff --git a/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java b/integration-tests/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/core/env/PropertyPlaceholderConfigurerEnvironmentIntegrationTests.java diff --git a/src/test/java/org/springframework/core/env/scan1/Config.java b/integration-tests/src/test/java/org/springframework/core/env/scan1/Config.java similarity index 100% rename from src/test/java/org/springframework/core/env/scan1/Config.java rename to integration-tests/src/test/java/org/springframework/core/env/scan1/Config.java diff --git a/src/test/java/org/springframework/core/env/scan1/DevConfig.java b/integration-tests/src/test/java/org/springframework/core/env/scan1/DevConfig.java similarity index 100% rename from src/test/java/org/springframework/core/env/scan1/DevConfig.java rename to integration-tests/src/test/java/org/springframework/core/env/scan1/DevConfig.java diff --git a/src/test/java/org/springframework/core/env/scan1/ProdConfig.java b/integration-tests/src/test/java/org/springframework/core/env/scan1/ProdConfig.java similarity index 100% rename from src/test/java/org/springframework/core/env/scan1/ProdConfig.java rename to integration-tests/src/test/java/org/springframework/core/env/scan1/ProdConfig.java diff --git a/src/test/java/org/springframework/core/env/scan2/DevBean.java b/integration-tests/src/test/java/org/springframework/core/env/scan2/DevBean.java similarity index 100% rename from src/test/java/org/springframework/core/env/scan2/DevBean.java rename to integration-tests/src/test/java/org/springframework/core/env/scan2/DevBean.java diff --git a/src/test/java/org/springframework/core/env/scan2/ProdBean.java b/integration-tests/src/test/java/org/springframework/core/env/scan2/ProdBean.java similarity index 100% rename from src/test/java/org/springframework/core/env/scan2/ProdBean.java rename to integration-tests/src/test/java/org/springframework/core/env/scan2/ProdBean.java diff --git a/src/test/java/org/springframework/expression/spel/support/BeanFactoryTypeConverter.java b/integration-tests/src/test/java/org/springframework/expression/spel/support/BeanFactoryTypeConverter.java similarity index 100% rename from src/test/java/org/springframework/expression/spel/support/BeanFactoryTypeConverter.java rename to integration-tests/src/test/java/org/springframework/expression/spel/support/BeanFactoryTypeConverter.java diff --git a/src/test/java/org/springframework/expression/spel/support/Spr7538Tests.java b/integration-tests/src/test/java/org/springframework/expression/spel/support/Spr7538Tests.java similarity index 100% rename from src/test/java/org/springframework/expression/spel/support/Spr7538Tests.java rename to integration-tests/src/test/java/org/springframework/expression/spel/support/Spr7538Tests.java diff --git a/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java b/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java diff --git a/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java b/integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java similarity index 100% rename from src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java rename to integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java diff --git a/src/test/java/org/springframework/transaction/annotation/ProxyAnnotationDiscoveryTests.java b/integration-tests/src/test/java/org/springframework/transaction/annotation/ProxyAnnotationDiscoveryTests.java similarity index 100% rename from src/test/java/org/springframework/transaction/annotation/ProxyAnnotationDiscoveryTests.java rename to integration-tests/src/test/java/org/springframework/transaction/annotation/ProxyAnnotationDiscoveryTests.java diff --git a/src/test/resources/META-INF/spring.handlers b/integration-tests/src/test/resources/META-INF/spring.handlers similarity index 100% rename from src/test/resources/META-INF/spring.handlers rename to integration-tests/src/test/resources/META-INF/spring.handlers diff --git a/src/test/resources/META-INF/spring.schemas b/integration-tests/src/test/resources/META-INF/spring.schemas similarity index 100% rename from src/test/resources/META-INF/spring.schemas rename to integration-tests/src/test/resources/META-INF/spring.schemas diff --git a/src/test/resources/com/foo/component-config.xml b/integration-tests/src/test/resources/com/foo/component-config.xml similarity index 100% rename from src/test/resources/com/foo/component-config.xml rename to integration-tests/src/test/resources/com/foo/component-config.xml diff --git a/src/test/resources/com/foo/component.xsd b/integration-tests/src/test/resources/com/foo/component.xsd similarity index 100% rename from src/test/resources/com/foo/component.xsd rename to integration-tests/src/test/resources/com/foo/component.xsd diff --git a/src/test/resources/log4j2-test.xml b/integration-tests/src/test/resources/log4j2-test.xml similarity index 100% rename from src/test/resources/log4j2-test.xml rename to integration-tests/src/test/resources/log4j2-test.xml diff --git a/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml similarity index 100% rename from src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml rename to integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml diff --git a/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml similarity index 100% rename from src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml rename to integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml diff --git a/src/test/resources/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml b/integration-tests/src/test/resources/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml similarity index 100% rename from src/test/resources/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml rename to integration-tests/src/test/resources/org/springframework/context/annotation/ltw/ComponentScanningWithLTWTests.xml diff --git a/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-dev.xml b/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-dev.xml similarity index 100% rename from src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-dev.xml rename to integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-dev.xml diff --git a/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-prod.xml b/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-prod.xml similarity index 100% rename from src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-prod.xml rename to integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context-prod.xml diff --git a/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml similarity index 100% rename from src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml rename to integration-tests/src/test/resources/org/springframework/core/env/EnvironmentSystemIntegrationTests-context.xml diff --git a/src/test/resources/org/springframework/transaction/annotation/enable-caching.xml b/integration-tests/src/test/resources/org/springframework/transaction/annotation/enable-caching.xml similarity index 100% rename from src/test/resources/org/springframework/transaction/annotation/enable-caching.xml rename to integration-tests/src/test/resources/org/springframework/transaction/annotation/enable-caching.xml diff --git a/src/test/resources/org/springframework/util/testlog4j.properties b/integration-tests/src/test/resources/org/springframework/util/testlog4j.properties similarity index 100% rename from src/test/resources/org/springframework/util/testlog4j.properties rename to integration-tests/src/test/resources/org/springframework/util/testlog4j.properties diff --git a/src/test/resources/org/springframework/web/util/testlog4j.properties b/integration-tests/src/test/resources/org/springframework/web/util/testlog4j.properties similarity index 100% rename from src/test/resources/org/springframework/web/util/testlog4j.properties rename to integration-tests/src/test/resources/org/springframework/web/util/testlog4j.properties diff --git a/settings.gradle b/settings.gradle index 60c6ceb4a3..e95a79b313 100644 --- a/settings.gradle +++ b/settings.gradle @@ -21,6 +21,7 @@ include "spring-webmvc" include "spring-webflux" include "spring-websocket" include "spring-framework-bom" +include "integration-tests" rootProject.name = "spring" rootProject.children.each {project ->