MINOR; Retry on test failure for branch builds and increase max test retry to 10 (#12601)

Originally, we only enabled retries for PR builds to avoid hiding timing
related issues. In practice, however, the results are too noisy without
any retry due to various environmental issues.

Enable 1 retry for all builds and increase the max test retry to 10.

Reviewers: José Armando García Sancio <jsancio@users.noreply.github.com>
This commit is contained in:
Ismael Juma 2022-09-08 08:00:16 -07:00 committed by GitHub
parent 0c97be53fa
commit 9237c47d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

7
Jenkinsfile vendored
View File

@ -29,15 +29,10 @@ def isChangeRequest(env) {
env.CHANGE_ID != null && !env.CHANGE_ID.isEmpty() env.CHANGE_ID != null && !env.CHANGE_ID.isEmpty()
} }
def retryFlagsString(env) {
if (isChangeRequest(env)) " -PmaxTestRetries=1 -PmaxTestRetryFailures=5"
else ""
}
def doTest(env, target = "unitTest integrationTest") { def doTest(env, target = "unitTest integrationTest") {
sh """./gradlew -PscalaVersion=$SCALA_VERSION ${target} \ sh """./gradlew -PscalaVersion=$SCALA_VERSION ${target} \
--profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed \ --profile --no-daemon --continue -PtestLoggingEvents=started,passed,skipped,failed \
-PignoreFailures=true -PmaxParallelForks=2""" + retryFlagsString(env) -PignoreFailures=true -PmaxParallelForks=2 -PmaxTestRetries=1 -PmaxTestRetryFailures=10"""
junit '**/build/test-results/**/TEST-*.xml' junit '**/build/test-results/**/TEST-*.xml'
} }