Skip to content

Commit 712d5c3

Browse files
authored
chore(ci): Enable test retry in CI (#9000)
1 parent 901a12d commit 712d5c3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

dd-smoke-tests/maven/src/test/groovy/datadog/smoketest/MavenSmokeTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
333333

334334
if (!p.waitFor(PROCESS_TIMEOUT_SECS, TimeUnit.SECONDS)) {
335335
p.destroyForcibly()
336-
throw new TimeoutException("Instrumented process failed to exit")
336+
throw new TimeoutException("Instrumented process failed to exit within $PROCESS_TIMEOUT_SECS")
337337
}
338338

339339
return p.exitValue()

gradle/configure_tests.gradle

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,13 @@ if (!project.property("activePartition")) {
124124
}
125125
}
126126
}
127+
128+
tasks.withType(Test) {
129+
// https://docs.gradle.com/develocity/flaky-test-detection/
130+
// https://docs.gradle.com/develocity/gradle-plugin/current/#test_retry
131+
develocity.testRetry {
132+
if (System.getenv().containsKey("CI")) {
133+
maxRetries = 3
134+
}
135+
}
136+
}

0 commit comments

Comments
 (0)