]> source.dussan.org Git - sonarqube.git/commitdiff
NO-JIRA Implemented flaky test detection
authorlukasz-jarocki-sonarsource <lukasz.jarocki@sonarsource.com>
Thu, 19 Oct 2023 10:22:37 +0000 (12:22 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 19 Oct 2023 20:03:27 +0000 (20:03 +0000)
build.gradle

index 4fc24dd184c7092fb7f80b4ed4542dadb46c33b3..c8904c6a9f549f05ecb64f4adbbfaef15b76a1eb 100644 (file)
@@ -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"