Allow for retrying tests locally (#4810)

This commit is contained in:
Nikita Salnikov-Tarnovski 2021-12-06 15:08:23 +02:00 committed by GitHub
parent 0dc410a2e3
commit d7fd2c9bc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -223,8 +223,9 @@ tasks.withType<Test>().configureEach {
timeout.set(Duration.ofMinutes(15))
retry {
val retryTests = System.getenv("CI") != null || rootProject.hasProperty("retryTests")
// You can see tests that were retried by this mechanism in the collected test reports and build scans.
maxRetries.set(if (System.getenv("CI") != null) 5 else 0)
maxRetries.set(if (retryTests) 5 else 0)
}
reports {