Skip to content

Commit

Permalink
adding retry failed test to gradle
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 fa00555 commit 0c2877f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ plugins {
id 'nebula.ospackage' version "8.3.0" apply false
id "com.diffplug.gradle.spotless" version "3.26.1"
id 'java-library'
id 'org.gradle.test-retry' version '1.0.0'
}

tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -150,6 +151,11 @@ def opensearch_tmp_dir = rootProject.file('build/private/opensearch_tmp').absolu
opensearch_tmp_dir.mkdirs()

test {
retry {
failOnPassedAfterRetry = false
maxFailures = 10
maxRetries = 10
}
include '**/*Tests.class'
systemProperty 'tests.security.manager', 'false'
}
Expand All @@ -162,6 +168,11 @@ task integTest(type: RestIntegTestTask) {
tasks.named("check").configure { dependsOn(integTest) }

integTest {
retry {
failOnPassedAfterRetry = false
maxFailures = 10
maxRetries = 10
}
dependsOn "bundlePlugin"
systemProperty 'tests.security.manager', 'false'
systemProperty 'java.io.tmpdir', opensearch_tmp_dir.absolutePath
Expand Down

0 comments on commit 0c2877f

Please sign in to comment.