From 6b4b5c499d3acc39cc5c6c7f4e976cf89d00cef3 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Fri, 6 Oct 2023 22:06:27 +0000 Subject: [PATCH] Only conditionally apply retries no integrationTests Signed-off-by: Peter Nied --- build.gradle | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index 5babc00567..04a28e4a06 100644 --- a/build.gradle +++ b/build.gradle @@ -190,16 +190,6 @@ task listTasksAsJSON { test { include '**/*.class' - doFirst { - // Only run with retries while in CI systems - if (System.getenv('CI_ENVIRONMENT') == 'normal') { - retry { - failOnPassedAfterRetry = false - maxRetries = 5 - } - } - } - filter { excludeTestsMatching "org.opensearch.security.sanity.tests.*" } @@ -208,6 +198,10 @@ test { if (JavaVersion.current() > JavaVersion.VERSION_1_8) { jvmArgs += "--add-opens=java.base/java.io=ALL-UNNAMED" } + retry { + failOnPassedAfterRetry = false + maxRetries = 5 + } jacoco { excludes = [ "com.sun.jndi.dns.*", @@ -251,6 +245,10 @@ def setCommonTestConfig(Test task) { if (JavaVersion.current() > JavaVersion.VERSION_1_8) { task.jvmArgs += "--add-opens=java.base/java.io=ALL-UNNAMED" } + task.retry { + failOnPassedAfterRetry = false + maxRetries = 5 + } task.jacoco { excludes = [ "com.sun.jndi.dns.*",