Skip to content

Commit 8d40cbd

Browse files
authored
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.
1 parent f31ee79 commit 8d40cbd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/spock/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies {
1212
testImplementation project(':mysql')
1313
testImplementation project(':postgresql')
1414

15-
testImplementation 'com.zaxxer:HikariCP:5.0.0'
15+
testImplementation 'com.zaxxer:HikariCP:4.0.3'
1616
testImplementation 'org.apache.httpcomponents:httpclient:4.5.13'
1717

1818
testRuntimeOnly 'org.postgresql:postgresql:42.2.24'
@@ -26,3 +26,10 @@ sourceJar {
2626
allSource contains both .java and .groovy files */
2727
from sourceSets.main.allSource
2828
}
29+
30+
test {
31+
useJUnitPlatform()
32+
testLogging {
33+
events "passed", "skipped", "failed"
34+
}
35+
}

0 commit comments

Comments
 (0)