Skip to content

Commit 37922ad

Browse files
Increase CI Visibility smoke tests timeout values (#9062)
1 parent 860a603 commit 37922ad

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

dd-smoke-tests/gradle/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ test {
2525

2626
// overriding the default timeout of 9 minutes set in configure_tests.gradle,
2727
// as Gradle smoke tests might run for a longer duration
28-
timeout = Duration.of(15, ChronoUnit.MINUTES)
28+
timeout = Duration.of(20, ChronoUnit.MINUTES)
2929
}
3030

dd-smoke-tests/maven/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tasks.withType(Test).configureEach {
2626

2727
// overriding the default timeout set in configure_tests.gradle, as Maven smoke
2828
// tests might run for a longer duration
29-
timeout = Duration.of(20, ChronoUnit.MINUTES)
29+
timeout = Duration.of(25, ChronoUnit.MINUTES)
3030

3131
if (project.hasProperty("mavenRepositoryProxy")) {
3232
// propagate proxy URL to tests, to then propagate it to nested Gradle builds

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
4141
private static final String JAVAC_PLUGIN_VERSION = Config.get().ciVisibilityCompilerPluginVersion
4242
private static final String JACOCO_PLUGIN_VERSION = Config.get().ciVisibilityJacocoPluginVersion
4343

44+
private static final int DEPENDENCIES_DOWNLOAD_TIMEOUT_SECS = 400
4445
private static final int PROCESS_TIMEOUT_SECS = 120
4546

4647
private static final int DEPENDENCIES_DOWNLOAD_RETRIES = 5
@@ -292,7 +293,7 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
292293
private void retryUntilSuccessfulOrNoAttemptsLeft(List<String> mvnCommand, Map<String, String> additionalEnvVars = [:]) {
293294
def processBuilder = createProcessBuilder(mvnCommand, false, false, [], additionalEnvVars)
294295
for (int attempt = 0; attempt < DEPENDENCIES_DOWNLOAD_RETRIES; attempt++) {
295-
def exitCode = runProcess(processBuilder.start())
296+
def exitCode = runProcess(processBuilder.start(), DEPENDENCIES_DOWNLOAD_TIMEOUT_SECS)
296297
if (exitCode == 0) {
297298
return
298299
}
@@ -308,15 +309,15 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
308309
return runProcess(processBuilder.start())
309310
}
310311

311-
private static runProcess(Process p) {
312+
private static runProcess(Process p, int timeout_secs = PROCESS_TIMEOUT_SECS) {
312313
StreamConsumer errorGobbler = new StreamConsumer(p.getErrorStream(), "ERROR")
313314
StreamConsumer outputGobbler = new StreamConsumer(p.getInputStream(), "OUTPUT")
314315
outputGobbler.start()
315316
errorGobbler.start()
316317

317-
if (!p.waitFor(PROCESS_TIMEOUT_SECS, TimeUnit.SECONDS)) {
318+
if (!p.waitFor(timeout_secs, TimeUnit.SECONDS)) {
318319
p.destroyForcibly()
319-
throw new TimeoutException("Instrumented process failed to exit within $PROCESS_TIMEOUT_SECS")
320+
throw new TimeoutException("Instrumented process failed to exit within $timeout_secs seconds")
320321
}
321322

322323
return p.exitValue()

0 commit comments

Comments
 (0)