@@ -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 $P ROCESS_TIMEOUT_SECS " )
320+ throw new TimeoutException (" Instrumented process failed to exit within $t imeout_secs seconds " )
320321 }
321322
322323 return p. exitValue()
0 commit comments