chore: テスト同時実行数の設定を修正

This commit is contained in:
usbharu 2023-10-10 18:03:25 +09:00
parent 3f830097ed
commit 6b2270356f
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.openapitools.generator.gradle.plugin.tasks.GenerateTask import org.openapitools.generator.gradle.plugin.tasks.GenerateTask
import kotlin.math.min import kotlin.math.max
val ktor_version: String by project val ktor_version: String by project
val kotlin_version: String by project val kotlin_version: String by project
@ -29,7 +29,7 @@ version = "0.0.1"
tasks.withType<Test> { tasks.withType<Test> {
useJUnitPlatform() useJUnitPlatform()
val cpus = Runtime.getRuntime().availableProcessors() val cpus = Runtime.getRuntime().availableProcessors()
maxParallelForks = min(1, cpus - 1) maxParallelForks = max(1, cpus - 1)
setForkEvery(4) setForkEvery(4)
} }