diff --git a/gradle/java.gradle b/gradle/java.gradle index 639aeb7d00..642939855d 100644 --- a/gradle/java.gradle +++ b/gradle/java.gradle @@ -282,6 +282,6 @@ tasks.withType(Test).configureEach { retry { // You can see tests that were retried by this mechanism in the collected test reports and build scans. - maxRetries = 5 + maxRetries = System.getenv("CI") != null ? 5 : 0 } }