Revise TestConventions to retain existing JUnit Platform options
This commit revises the implementation of TestConventions so that existing JUnit Platform options from a pre-configured `test` task are copied instead of overridden. Closes gh-34827
This commit is contained in:
@@ -105,14 +105,10 @@ test {
|
||||
description = "Runs JUnit 4, JUnit Jupiter, and TestNG tests."
|
||||
useJUnitPlatform {
|
||||
includeEngines "junit-vintage", "junit-jupiter", "testng"
|
||||
excludeTags "failing-test-case"
|
||||
}
|
||||
// We use `include` instead of `filter.includeTestsMatching`, since
|
||||
// the latter results in some tests being executed/reported
|
||||
// multiple times.
|
||||
include(["**/*Tests.class", "**/*Test.class"])
|
||||
// `include` test filters and system properties are configured in
|
||||
// org.springframework.build.TestConventions in buildSrc.
|
||||
filter.excludeTestsMatching("*TestCase")
|
||||
systemProperty("testGroups", project.properties.get("testGroups"))
|
||||
// Java Util Logging for the JUnit Platform.
|
||||
// Optionally configure Java Util Logging for the JUnit Platform.
|
||||
// systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user