Skip to content

Commit 71efec0

Browse files
authored
Try parallel tests (#9797)
* Try parallel tests * Try to have "normal tests" running with 1 fork only * Fix typo
1 parent fb93c2f commit 71efec0

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

build.gradle

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,16 +525,32 @@ testlogger {
525525
showStackTraces false
526526
}
527527

528+
tasks.withType(Test) {
529+
reports.html.outputLocation.set(file("${reporting.baseDir}/${name}"))
530+
// Enable parallel tests. See https://docs.gradle.org/8.1/userguide/performance.html#execute_tests_in_parallel for details.
531+
maxParallelForks = Runtime.runtime.availableProcessors() - 1
532+
}
533+
528534
tasks.register('databaseTest', Test) {
529535
useJUnitPlatform {
530536
includeTags 'DatabaseTest'
531537
}
538+
539+
testLogging {
540+
// set options for log level LIFECYCLE
541+
events = ["FAILED"]
542+
exceptionFormat "full"
543+
}
544+
545+
maxParallelForks = 1
532546
}
533547

534548
tasks.register('fetcherTest', Test) {
535549
useJUnitPlatform {
536550
includeTags 'FetcherTest'
537551
}
552+
553+
maxParallelForks = 1
538554
}
539555

540556
tasks.register('guiTest', Test) {
@@ -547,6 +563,8 @@ tasks.register('guiTest', Test) {
547563
events = ["FAILED"]
548564
exceptionFormat "full"
549565
}
566+
567+
maxParallelForks = 1
550568
}
551569

552570
// Test result tasks
@@ -556,10 +574,6 @@ tasks.register('copyTestResources', Copy) {
556574
}
557575
processTestResources.dependsOn copyTestResources
558576

559-
tasks.withType(Test) {
560-
reports.html.outputLocation.set(file("${reporting.baseDir}/${name}"))
561-
}
562-
563577
tasks.register('jacocoPrepare') {
564578
doFirst {
565579
// Ignore failures of tests

0 commit comments

Comments
 (0)