You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace TestSourcesPlugin with Gradle test fixture support
Prior to this series of commits, the Spring Framework build used a
custom TestSourcesPlugin to share test utilities and fixtures between
projects. This plugin served its purpose; however, it also had its
drawbacks:
- All test code was visible in all other (downstream) projects, and that
made it too easy to introduce unnecessary coupling. For example,
this made it more difficult to migrate to JUnit Jupiter.
This commit addresses such issues by migrating to Gradle's first-class
support for "Java test fixtures".
- Having test fixture code in a dedicated source folder makes it
readily apparent that the code is reused across the test suite.
- The build is now much cleaner since projects explicitly declare that
they rely on specific test fixtures of upstream projects.
- Incremental builds are now much faster on average since downstream
projects no longer have to be recompiled due to changes in tests in
upstream projects.
- Prior to these commits we effectively had around 20 test fixture
dependencies. With these commits we effectively now have only 7 test
fixture dependencies (i.e., projects that share test fixtures).
Closesgh-23550
Copy file name to clipboardExpand all lines: integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java
Copy file name to clipboardExpand all lines: integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java
Copy file name to clipboardExpand all lines: integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java
Copy file name to clipboardExpand all lines: integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java
Copy file name to clipboardExpand all lines: integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml
Copy file name to clipboardExpand all lines: integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml
+7-7
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@
34
34
</bean>
35
35
36
36
<!-- Often we can leave the definition of such infrastructural beans to child factories -->
0 commit comments