mirror of https://github.com/apache/kafka.git
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:
parent
0c97be53fa
commit
9237c47d3f
|
@ -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'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue