Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try parallel tests #9797

Merged
merged 4 commits into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 18 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -525,16 +525,32 @@ testlogger {
showStackTraces false
}

tasks.withType(Test) {
reports.html.outputLocation.set(file("${reporting.baseDir}/${name}"))
// Enable parallel tests. See https://docs.gradle.org/8.1/userguide/performance.html#execute_tests_in_parallel for details.
maxParallelForks = Runtime.runtime.availableProcessors() - 1
}

tasks.register('databaseTest', Test) {
useJUnitPlatform {
includeTags 'DatabaseTest'
}

testLogging {
// set options for log level LIFECYCLE
events = ["FAILED"]
exceptionFormat "full"
}

maxParallelForks = 1
}

tasks.register('fetcherTest', Test) {
useJUnitPlatform {
includeTags 'FetcherTest'
}

maxParallelForks = 1
}

tasks.register('guiTest', Test) {
Expand All @@ -547,6 +563,8 @@ tasks.register('guiTest', Test) {
events = ["FAILED"]
exceptionFormat "full"
}

maxParallelForks = 1
}

// Test result tasks
Expand All @@ -556,10 +574,6 @@ tasks.register('copyTestResources', Copy) {
}
processTestResources.dependsOn copyTestResources

tasks.withType(Test) {
reports.html.outputLocation.set(file("${reporting.baseDir}/${name}"))
}

tasks.register('jacocoPrepare') {
doFirst {
// Ignore failures of tests
Expand Down