Description
Overview
As I mentioned in commit e384389, our TestConventions
implementation currently overrides any pre-configured JUnit Platform options in an existing Gradle test
task.
Actually, it overrides any existing test
task configuration that TestConventions
also happens to set. So, this is not limited to JUnit Platform options, but the JUnit Platform options are typically the most important configuration options that should be retained.
Specifically, TestConventions
overrides configuration for the test
tasks in spring-context.gradle
and spring-test.gradle
. Consequently, configuration such as includeEngines "junit-jupiter", "junit-vintage"
is not honored, and the test
task will erroneously succeed without the presence of the JUnit Vintage test engine, which will silently ignore tests such as SpringAtInjectTckTests
(for the @Inject
TCK) and all JUnit 4 tests in the spring-test
module.
Thus, we should revise the implementation of TestConventions
so that existing JUnit options are copied instead of overridden.
Related Issues
- Move build test configuration to Gradle convention (commit 9562a1c)
- Reinstate the
@Inject
Technology Compatibility Kit (TCK) #34800