Test cluster throttle should never be less than 1 (#51713)

This commit is contained in:
Mark Vieira 2020-01-30 17:06:56 -08:00
parent 6b18cab826
commit 6c879ac63c
No known key found for this signature in database
GPG Key ID: CA947EF7E6D4B105
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ public class TestClustersPlugin implements Plugin<Project> {
.registerIfAbsent(
THROTTLE_SERVICE_NAME,
TestClustersThrottle.class,
spec -> spec.getMaxParallelUsages().set(Math.min(1, project.getGradle().getStartParameter().getMaxWorkerCount() / 2))
spec -> spec.getMaxParallelUsages().set(Math.max(1, project.getGradle().getStartParameter().getMaxWorkerCount() / 2))
);
// register cluster hooks