Skip to content
Merged
2 changes: 1 addition & 1 deletion dd-smoke-tests/gradle/build.gradle
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,6 @@ test {

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

2 changes: 1 addition & 1 deletion dd-smoke-tests/maven/build.gradle
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,7 @@ tasks.withType(Test).configureEach {

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

if (project.hasProperty("mavenRepositoryProxy")) {
// propagate proxy URL to tests, to then propagate it to nested Gradle builds
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -46,6 +46,7 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
private static final String JAVAC_PLUGIN_VERSION = Config.get().ciVisibilityCompilerPluginVersion
private static final String JACOCO_PLUGIN_VERSION = Config.get().ciVisibilityJacocoPluginVersion

private static final int DEPENDENCIES_DOWNLOAD_TIMEOUT_SECS = 400
private static final int PROCESS_TIMEOUT_SECS = 120

private static final int DEPENDENCIES_DOWNLOAD_RETRIES = 5
Expand DownExpand Up@@ -293,7 +294,7 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
private void retryUntilSuccessfulOrNoAttemptsLeft(List<String> mvnCommand, Map<String, String> additionalEnvVars = [:]) {
def processBuilder = createProcessBuilder(mvnCommand, false, false, [], additionalEnvVars)
for (int attempt = 0; attempt < DEPENDENCIES_DOWNLOAD_RETRIES; attempt++) {
def exitCode = runProcess(processBuilder.start())
def exitCode = runProcess(processBuilder.start(), DEPENDENCIES_DOWNLOAD_TIMEOUT_SECS)
if (exitCode == 0) {
return
}
Expand All@@ -309,15 +310,15 @@ class MavenSmokeTest extends CiVisibilitySmokeTest {
return runProcess(processBuilder.start())
}

private static runProcess(Process p) {
private static runProcess(Process p, int timeout_secs = PROCESS_TIMEOUT_SECS) {
StreamConsumer errorGobbler = new StreamConsumer(p.getErrorStream(), "ERROR")
StreamConsumer outputGobbler = new StreamConsumer(p.getInputStream(), "OUTPUT")
outputGobbler.start()
errorGobbler.start()

if (!p.waitFor(PROCESS_TIMEOUT_SECS, TimeUnit.SECONDS)) {
if (!p.waitFor(timeout_secs, TimeUnit.SECONDS)) {
p.destroyForcibly()
throw new TimeoutException("Instrumented process failed to exit within $PROCESS_TIMEOUT_SECS")
throw new TimeoutException("Instrumented process failed to exit within $timeout_secs seconds")
}

return p.exitValue()
Expand Down
Loading