oai/gradle/test/junit5.gradle

42 lines
1.8 KiB
Groovy
Raw Permalink Normal View History

dependencies {
testImplementation testLibs.junit.jupiter.api
testImplementation testLibs.junit.jupiter.params
testImplementation testLibs.hamcrest
testRuntimeOnly testLibs.junit.jupiter.engine
testRuntimeOnly testLibs.junit.jupiter.platform.launcher
}
test {
useJUnitPlatform()
2023-01-24 17:36:39 +01:00
failFast = false
jvmArgs '--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED',
'--add-exports=java.base/jdk.internal.ref=ALL-UNNAMED',
'--add-exports=java.base/sun.nio.ch=ALL-UNNAMED',
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.lang.reflect=ALL-UNNAMED',
'--add-opens=java.base/java.io=ALL-UNNAMED',
'--add-opens=java.base/java.nio=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED'
systemProperty 'java.util.logging.config.file', 'src/test/resources/logging.properties'
systemProperty 'io.netty.tryReflectionSetAccessible', 'false'
systemProperty 'io.netty.allocator.typ', 'pooled'
systemProperty 'io.netty.noUnsafe', 'true'
systemProperty 'io.netty.noKeySetOptimization', 'true'
systemProperty 'io.netty.eventLoopThreads', '8'
systemProperty 'io.netty.recycler.maxCapacityPerThread', '0'
systemProperty 'io.netty.transport.noNative', 'true'
testLogging {
2024-10-10 10:31:45 +02:00
showStandardStreams = true
events 'STARTED', 'PASSED', 'FAILED', 'SKIPPED'
}
afterSuite { desc, result ->
if (!desc.parent) {
println "\nTest result: ${result.resultType}"
println "Test summary: ${result.testCount} tests, " +
"${result.successfulTestCount} succeeded, " +
"${result.failedTestCount} failed, " +
"${result.skippedTestCount} skipped"
}
}
}