Allow disabling retry tests with parameters on CI

This commit is contained in:
Nikolay Krasko
2021-10-28 14:03:32 +03:00
committed by TeamCityServer
parent 604f217360
commit b76e670ad5
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -1,9 +1,12 @@
apply(plugin = "org.gradle.test-retry")
val testRetryMaxRetries = findProperty("kotlin.build.testRetry.maxRetries")?.toString()?.toInt() ?:
(if (kotlinBuildProperties.isTeamcityBuild) 3 else 0)
tasks.withType<Test>().configureEach {
configure<org.gradle.testretry.TestRetryTaskExtension> {
maxRetries.set(if (kotlinBuildProperties.isTeamcityBuild) 3 else 0)
maxRetries.set(testRetryMaxRetries)
maxFailures.set(20)
failOnPassedAfterRetry.set(false)
}