-
Notifications
You must be signed in to change notification settings - Fork 38.4k
first support for meta-annotations for the integration tests #201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first support for meta-annotations for the integration tests #201
Conversation
PS I have signed and agree to the terms of the SpringSource Individual Contributor License Agreement. |
WARNING!!! I just discovered that I forgot an important thing: the inheritance of the AC configuration files in integration tests! At the moment I "put together" all I suspect (very much) that my pull request should be extended. I apologize for this momentary oversight. |
Update the TestSourceSetDependenciesPlugin to consider testCompile configurations.
Remove all direct sourceSets.test.output dependencies and instead rely on the 'test-source-set-dependencies' plugin. This commit also updates the api JavaDoc task to ensure that dependencies are not resolved too early.
* share-test-classes: Polish test sourceSet dependencies Add test dependencies sources for testCompile
Refactor spring-core tests to replace test beans from 'org.springframework.beans' with lighter test objects in 'org.springframework.tests.sample.objects'.
Prior to this commit many test utility classes and sample beans were duplicated across projects. This was previously necessary due to the fact that dependent test sources were not shared during a gradle build. Since the introduction of the 'test-source-set-dependencies' gradle plugin this is no longer the case. This commit attempts to remove as much duplicate code as possible, co-locating test utilities and beans in the most suitable project. For example, test beans are now located in the 'spring-beans' project. Some of the duplicated code had started to drift apart when modifications made in one project where not ported to others. All changes have now been consolidated and when necessary existing tests have been refactored to account for the differences. Conflicts: spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
* cleanup-test-duplicates: Update Apache license headers for affected sources Remove duplicate test classes Replace test beans with test objects Conflicts: spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
Catch up to latest changes on cleanup-3.2.x in order to avoid conflicts when adding additional commits fixing compiler warnings.
Issue: SPR-9431
The files deleted in this commit existed in identical form in two places within a given module; typically in src/test/java and src/test/resources. The version within src/test/resources has been favored in all cases. This change was prompted by associated Eclipse warnings, which have now been quelled. Issue: SPR-9431
- Suppress an (intentional) AspectJ warning - Remove unused imports - Suppress a [hiding] warning - Fix a generics warning related to extension of final types Issue: SPR-9431
Prior to this change, spring-beans contained its own META-INF containing spring.handlers and spring.schemas files in src/main/resources; it also had files of the same name within src/test/resources/META-INF, causing 'duplicate resource' warnings and confusion in general. This commit moves the com.foo test package, it's associated namespace parsing tests and test versions of META-INF files to the root project and it's src/test integration testing folder. Issue: SPR-9431
Issue: SPR-9431
Prior to this commit, ClassWithAsyncAnnotation#return5 forced an unsuppressable warning in Eclipse, making it virtually impossible to get to a zero-warnings state in the codebase. The 'solution' here is simply to comment out the method and it's associated test case. The 'declare warnings' functionality around @async is well-understood and has long been stable. Also, the entire AnnotationAsyncExecutionAspectTests class has been added to TestGroup#PERFORMANCE (SPR-9984), as opposed to just asyncMethodGetsRoutedAsynchronously as it was previously, the rationale being that all tests are actually timing dependent. Issue: SPR-9431, SPR-9984
* SPR-9431: Eliminate AJ @async warning in test case Update Apache license headers for moved files Move namespace tests to root integration module Fix several miscellaneous compiler/Eclipse warnings Remove duplicate test resources Fix warnings due to unused import statements
* cleanup-3.2.x: Eliminate AJ @async warning in test case Update Apache license headers for moved files Move namespace tests to root integration module Fix several miscellaneous compiler/Eclipse warnings Remove duplicate test resources Fix warnings due to unused import statements Update Apache license headers for affected sources Remove duplicate test classes Replace test beans with test objects Polish test sourceSet dependencies Add test dependencies sources for testCompile
* cleanup-3.2.x: (37 commits) Eliminate AJ @async warning in test case Update Apache license headers for moved files Move namespace tests to root integration module Fix several miscellaneous compiler/Eclipse warnings Remove duplicate test resources Fix warnings due to unused import statements Update Apache license headers for affected sources Remove duplicate test classes Replace test beans with test objects Polish test sourceSet dependencies Add test dependencies sources for testCompile Use unmodified 'version' when not on a topic branch Enable execution of TestNG tests in spring-test Polish support for topic branch-specific versions Segregate add'l long-running and performance tests Eliminate EBR dependencies and repository config Skip creation of IDEA metadata for spring-aspects Fix Eclipse compilation error in Gradle plugin Polish build.gradle Recursively add test dependencies ...
This patch marks remaining/missed tests as ones belonging to performance tests group. Issue: SPR-9984
# By Stevo Slavic * sslavic/SPR-9984: Mark all IsFastEnough tests as performance tests
* SPR-9984: Mark all IsFastEnough tests as performance tests
Split packages are a well-known anti-pattern for OSGi and a blocker for Eclipse Virgo (which prevents split packages being accessed via its Import-Library construct). Split packages are also unhelpful with a traditional linear classpath as a split package name does not uniquely identify the Spring framework JAR from which it came, thus complicating problem diagnosis and maintenance. Juergen Hoeller supports this position in the following comment in SPR-9990: >FWIW, I generally find split packages a bad practice, even without >OSGi in the mix. For the Spring Framework codebase, I consider a >split-package arrangement a design accident that we want to detect >in any case - and that we're willing to fix if it happened. > >I'm actually equally concerned about the source perspective: After >all, we want a package to be comprehensible from a single glance >at the project, not requiring the developer to jump into several >source modules to understand the overall layout of a package. Split packages have crept into Spring framework twice in recent months - see SPR-9811 and SPR-9988. Currently, they are only detected once the Spring framework has been converted to OSGi bundles and these bundles have been tested with Eclipse Virgo. This commit adds a build-time check for split packages to the Spring framework build. Issue: SPR-9990 Conflicts: build.gradle
Allow packages to be split across projects which will be merged into a single JAR file. Make split package detection a dependency of the 'check' task. This is idiomatic gradle as well as allowing the 'test' task (another dependency of 'check') to be executed without split packages being detected. Omit the project spring-instructment-tomcat from the check on the basis of SPR-10150. Issues: SPR-9990, SPR-10150 Conflicts: build.gradle
Update the gradle 'api' task to depend on the 'jar' task of all subprojects. This intern ensures that the 'asmRepackJar' and 'cglibRepackJar' tasks run which is critical for JavaDoc generation.
ServletUriComponentsBuilder now supports setting the host to the value held in the X-Forwarded-Host [0] header used in reverse proxy scenarios. [0] http://tools.ietf.org/html/draft-ietf-appsawg-http-forwarded-10 Issue: SPR-10110
* cleanup-3.2.x: Gradle 'api' task depends on 'jar' tasks Mark all IsFastEnough tests as performance tests
@RequestMapping annotations now support ${...} placeholders. Issue: SPR-9935
Update DefaultListableBeanFactory.getBean(Class<?> beanClass) to consider the 'primary' attribute of bean definitions. This makes getBean() behave in the same way as autowiring. Issue: SPR-7854
- Corrected path to 'docs/spring-framework-reference' - Minor formatting changes
Issue: SPR-9983
Allow an embedded value resolver added to an AbstractBeanFactory to return null without adversely effecting any subsequent resolvers. Issue: SPR-8565
…ible Issue: SPR-9985
…tom ThreadPoolExecutor subclasses Issue: SPR-9435
…(for EHCache CacheManager setup) Issue: SPR-9713
…resolution Issue: SPR-9455
… with a specific encoding Also added constructor with Charset argument to EncodedResource. Issue: SPR-10096
Change 'compile' dependencies to 'provided' for projects that are merged into other projects. This seems to prevent '-sources' and '-javadoc' jars from appearing on the classpath which can break javadoc generation.
…javadoc Issue: SPR-8659
…operties across all variants Issue: SPR-9078
Issue: SPR-9970
* SPR-9970: Avoid UnsupportedOperationEx. with active SecurityManager
Issue: SPR-7827 prior this commit, there was no support for meta-annotations in the Spring Intergation tests, now the @ContextConfiguration annotation is searched also in meta-annotations. Eg: you can write: --------------- @ContextConfiguration([...]) // config for HSQLDB environment public @interface InRamEnvironment --------------- @ContextConfiguration([...]) // config for common-core part public @interface CommonCoreIntegrationTest --------------- @CommonCoreIntegrationTest @InRamEnvironment public class OneBatchTest { [...] // actual test methods
I fixed the problems, and rebased, but there are too much commits, I'm closing this pull request, and open a fresh new one. |
new PR: #219 |
related to issue: https://jira.springsource.org/browse/SPR-7827
prior this commit, there was no support for meta-annotations in the Spring Intergation tests, now the @ContextConfiguration annotation is searched also in meta-annotations.
Eg: you can write: