@@ -12,7 +12,7 @@ import java.nio.file.{Files, NoSuchFileException, Path, Paths}
1212import java .nio .charset .{Charset , StandardCharsets }
1313import java .text .SimpleDateFormat
1414import java .util .{HashMap , Timer , TimerTask }
15- import java .util .concurrent .{ExecutionException , TimeUnit , TimeoutException , Executors => JExecutors }
15+ import java .util .concurrent .{TimeUnit , TimeoutException , Executors => JExecutors }
1616
1717import scala .collection .mutable
1818import scala .io .{Codec , Source }
@@ -511,12 +511,6 @@ trait ParallelTesting extends RunnerOrchestration { self =>
511511 .and(" -d" , targetDir.getPath)
512512 .withClasspath(targetDir.getPath)
513513
514- def waitForJudiciously (process : Process ): Int =
515- try process.waitFor()
516- catch case _ : InterruptedException =>
517- try if process.waitFor(5L , TimeUnit .MINUTES ) then process.exitValue() else - 2
518- finally Thread .currentThread.interrupt()
519-
520514 def compileWithJavac (fs : Array [String ]) = if (fs.nonEmpty) {
521515 val fullArgs = Array (
522516 " -encoding" , StandardCharsets .UTF_8 .name,
@@ -525,7 +519,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
525519 val process = Runtime .getRuntime.exec(" javac" +: fullArgs)
526520 val output = Source .fromInputStream(process.getErrorStream).mkString
527521
528- if waitForJudiciously( process) != 0 then Some (output)
522+ if process.waitFor( ) != 0 then Some (output)
529523 else None
530524 } else None
531525
@@ -704,11 +698,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
704698
705699 for fut <- eventualResults do
706700 try fut.get()
707- catch
708- case ee : ExecutionException if ee.getCause.isInstanceOf [InterruptedException ] =>
709- System .err.println(" Interrupted (probably running after shutdown)" )
710- ee.printStackTrace()
711- case ex : Exception =>
701+ catch case ex : Exception =>
712702 System .err.println(ex.getMessage)
713703 ex.printStackTrace()
714704
0 commit comments