From 03cdb99b5f52e86631c3e45676aba2fd2bcf21b0 Mon Sep 17 00:00:00 2001 From: Owais Kazi Date: Wed, 24 Jan 2024 16:04:22 -0800 Subject: [PATCH] Retry flaky tests (#449) * Retry flaky tests Signed-off-by: Owais Kazi * Addressed PR Comments Signed-off-by: Owais Kazi --------- Signed-off-by: Owais Kazi --- build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index 99de67749..168931fd7 100644 --- a/build.gradle +++ b/build.gradle @@ -42,6 +42,7 @@ buildscript { plugins { id "de.undercouch.download" version "5.5.0" + id "org.gradle.test-retry" version "1.5.4" apply false } apply plugin: 'java' @@ -405,6 +406,19 @@ task integTestRemote(type: RestIntegTestTask) { } } + +// test retry configuration +subprojects { + apply plugin: "org.gradle.test-retry" + tasks.withType(RestIntegTestTask).configureEach { + retry { + failOnPassedAfterRetry = false + maxRetries = 3 + maxFailures = 5 + } + } +} + // Automatically sets up the integration test cluster locally run { doFirst {