Skip to content

Commit

Permalink
Tweak maxParallelForks (#2181)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Jul 2, 2024
2 parents f345acf + 7555daa commit b456d1c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions gradle/special-tests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,10 @@ tasks.withType(Test).configureEach {
maxRetries = 2
maxFailures = 10
}

// There are only 2 cores in each GitHub Action Runner, we use all of them here.
maxParallelForks = Runtime.getRuntime().availableProcessors()
} else {
// https://docs.gradle.org/8.4/userguide/performance.html#execute_tests_in_parallel
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}

// https://docs.gradle.org/8.8/userguide/performance.html#execute_tests_in_parallel
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
tasks.named('test').configure {
useJUnitPlatform {
Expand Down

0 comments on commit b456d1c

Please sign in to comment.