From 8d40cbd75c4bbb10797e8543d080ad6e046bc1ce Mon Sep 17 00:00:00 2001 From: Kevin Wittek Date: Tue, 12 Oct 2021 09:27:34 +0200 Subject: [PATCH] Enable `JUnitPlatform` for Spock tests (#4568) Since Spock 2 is based on the JUnit platform, Gradle needs to be configured explicitly to discover and run the tests. Also, since HikariCP 5 requires JDK 11+, we have to switch back to 4.0.3. --- modules/spock/build.gradle | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/spock/build.gradle b/modules/spock/build.gradle index 3fc86d7877b..1e280e88965 100644 --- a/modules/spock/build.gradle +++ b/modules/spock/build.gradle @@ -12,7 +12,7 @@ dependencies { testImplementation project(':mysql') testImplementation project(':postgresql') - testImplementation 'com.zaxxer:HikariCP:5.0.0' + testImplementation 'com.zaxxer:HikariCP:4.0.3' testImplementation 'org.apache.httpcomponents:httpclient:4.5.13' testRuntimeOnly 'org.postgresql:postgresql:42.2.24' @@ -26,3 +26,10 @@ sourceJar { allSource contains both .java and .groovy files */ from sourceSets.main.allSource } + +test { + useJUnitPlatform() + testLogging { + events "passed", "skipped", "failed" + } +}