Skip to content

Commit

Permalink
Enable JUnitPlatform for Spock tests (#4568)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kiview committed Oct 12, 2021
1 parent f31ee79 commit 8d40cbd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/spock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -26,3 +26,10 @@ sourceJar {
allSource contains both .java and .groovy files */
from sourceSets.main.allSource
}

test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}

0 comments on commit 8d40cbd

Please sign in to comment.