From d85ecfa3baad4d74bff582c8fcd71cc306b83a56 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 25 Apr 2023 00:47:24 +0200 Subject: [PATCH 1/3] Try parallel tests --- build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle b/build.gradle index 911769e6ec4..ebf135652d1 100644 --- a/build.gradle +++ b/build.gradle @@ -429,6 +429,8 @@ task databaseTest(type: Test) { events = ["FAILED"] exceptionFormat "full" } + + maxParallelForks = 1 } task fetcherTest(type: Test) { @@ -464,6 +466,8 @@ processTestResources.dependsOn copyTestResources 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().intdiv(2) ?: 1 } task jacocoPrepare() { From d8277d479c4a750bef1bc7369c2e681797e557e3 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 7 May 2024 14:53:28 +0200 Subject: [PATCH 2/3] Try to have "normal tests" running with 1 fork only --- build.gradle | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 9035b2e4dac..8a4c4f6e5f1 100644 --- a/build.gradle +++ b/build.gradle @@ -525,6 +525,12 @@ 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' @@ -543,6 +549,8 @@ tasks.register('fetcherTest', Test) { useJUnitPlatform { includeTags 'FetcherTest' } + + maxParallelForks = 1 } tasks.register('guiTest', Test) { @@ -555,6 +563,8 @@ tasks.register('guiTest', Test) { events = ["FAILED"] exceptionFormat "full" } + + maxParallelForks = 1 } // Test result tasks @@ -564,12 +574,6 @@ tasks.register('copyTestResources', Copy) { } processTestResources.dependsOn copyTestResources -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().intdiv(2) ?: 1 -} - tasks.register('jacocoPrepare') { doFirst { // Ignore failures of tests From 654e0b2bdae6bbcd203364fcff919c054695f7e3 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 7 May 2024 14:56:36 +0200 Subject: [PATCH 3/3] Fix typo --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 8a4c4f6e5f1..1937d392acb 100644 --- a/build.gradle +++ b/build.gradle @@ -359,7 +359,7 @@ processResources { "biodiversityHeritageApiKey": System.getenv('BiodiversityHeritageApiKey') ? System.getenv('BiodiversityHeritageApiKey') : '', "semanticScholarApiKey": System.getenv('SemanticScholarApiKey') ? System.getenv("SemanticScholarApiKey") : '' ) - filteringCharset = 'UTF-8'9797 + filteringCharset = 'UTF-8' } filesMatching(["resources/resource/ods/meta.xml", "resources/resource/openoffice/meta.xml"]) {