From 631af9cf00da2ca21eb022d030cd16f3e7d5aae3 Mon Sep 17 00:00:00 2001 From: lukasz-jarocki-sonarsource Date: Thu, 19 Oct 2023 12:22:37 +0200 Subject: [PATCH] NO-JIRA Implemented flaky test detection --- build.gradle | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.gradle b/build.gradle index 4fc24dd184c..c8904c6a9f5 100644 --- a/build.gradle +++ b/build.gradle @@ -763,6 +763,15 @@ ext.osAdaptiveCommand = { commands -> return newCommands } +tasks.matching { task -> task instanceof Test || task instanceof BlackBoxTest}.configureEach { + retry { + if (System.getenv('CI') == "true") { + maxRetries = 3 + failOnPassedAfterRetry = true + } + } +} + tasks.named('sonarqube') { onlyIf { System.getenv('CI') == "true" -- 2.39.5