From 8257c86f299fb72cba4b409f232ea532c3121f65 Mon Sep 17 00:00:00 2001 From: Amit Galitzky Date: Wed, 23 Mar 2022 21:28:15 +0000 Subject: [PATCH] only retry tests when running CI, changing retry to 8 Signed-off-by: Amit Galitzky --- build.gradle | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index a8500b5c3..ab27f8736 100644 --- a/build.gradle +++ b/build.gradle @@ -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' @@ -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'