Skip to content

Commit

Permalink
configure test to retry for CI job
Browse files Browse the repository at this point in the history
Signed-off-by: rs-eliatra <rafal.stobiecki@eliatra.com>
  • Loading branch information
rs-eliatra committed Feb 3, 2022
1 parent 6d15aba commit 4e94fad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- opendistro-*

env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3
GRADLE_OPTS: -Dhttp.keepAlive=false -DCI=true

jobs:
build:
Expand Down
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ plugins {

id "nebula.ospackage" version "9.0.0"
id "com.google.osdetector" version "1.7.0"
id "org.gradle.test-retry" version "1.3.1"
}
import org.gradle.crypto.checksum.Checksum

Expand Down Expand Up @@ -211,13 +212,17 @@ testsJar {
libsDirName = '.'
}

boolean isCI = System.getenv().containsKey("CI")

test {
maxParallelForks = 3
jvmArgs "-Xmx3072m"
retry {
failOnPassedAfterRetry = false
maxFailures = 30
maxRetries = 3
if (isCI) {
failOnPassedAfterRetry = false
maxFailures = 30
maxRetries = 3
}
}
}

Expand Down

0 comments on commit 4e94fad

Please sign in to comment.