Skip to content

Commit

Permalink
only retry tests when running CI, changing retry to 8
Browse files Browse the repository at this point in the history
Signed-off-by: Amit Galitzky <[email protected]>
  • Loading branch information
amitgalitz committed Mar 24, 2022
1 parent 0c2877f commit 8257c86
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,13 @@ def _numNodes = findProperty('numNodes') as Integer ?: 1

def opensearch_tmp_dir = rootProject.file('build/private/opensearch_tmp').absoluteFile
opensearch_tmp_dir.mkdirs()

boolean isCiServer = System.getenv().containsKey("CI")
test {
retry {
failOnPassedAfterRetry = false
maxFailures = 10
maxRetries = 10
if (isCiServer) {
failOnPassedAfterRetry = false
maxRetries = 8
}
}
include '**/*Tests.class'
systemProperty 'tests.security.manager', 'false'
Expand All @@ -169,9 +170,10 @@ tasks.named("check").configure { dependsOn(integTest) }

integTest {
retry {
failOnPassedAfterRetry = false
maxFailures = 10
maxRetries = 10
if (isCiServer) {
failOnPassedAfterRetry = false
maxRetries = 8
}
}
dependsOn "bundlePlugin"
systemProperty 'tests.security.manager', 'false'
Expand Down

0 comments on commit 8257c86

Please sign in to comment.