From c9f4aed18df0465a4e9e89669c31d52ed97f6ff8 Mon Sep 17 00:00:00 2001 From: Goooler Date: Wed, 26 Apr 2023 18:33:37 +0800 Subject: [PATCH] Revert changes for integration tests --- .../jetbrains/conventions/dokka-integration-test.gradle.kts | 6 ++---- gradle.properties | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts b/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts index f29dd3c79e..f9edb68e8e 100644 --- a/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts +++ b/build-logic/src/main/kotlin/org/jetbrains/conventions/dokka-integration-test.gradle.kts @@ -51,10 +51,8 @@ val integrationTest by tasks.registering(NonCacheableIntegrationTest::class) { classpath = integrationTestSourceSet.runtimeClasspath setForkEvery(1) - maxParallelForks = if (System.getenv("GITHUB_ACTIONS") != null) { - Runtime.getRuntime().availableProcessors() - } else { - (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1 + project.properties["dokka_integration_test_parallelism"]?.toString()?.toIntOrNull()?.let { parallelism -> + maxParallelForks = parallelism } environment( "isExhaustive", diff --git a/gradle.properties b/gradle.properties index 044817d8fb..2fe431fd7e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,7 @@ dokka_version=1.8.20-SNAPSHOT org.jetbrains.dokka.javaToolchain.mainCompiler=8 org.jetbrains.dokka.javaToolchain.testLauncher=8 org.jetbrains.dokka.kotlinLanguageLevel=1.4 +dokka_integration_test_parallelism=2 # Code style kotlin.code.style=official