@@ -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 }
@@ -512,12 +512,6 @@ trait ParallelTesting extends RunnerOrchestration { self =>
512512 .and(" -d" , targetDir.getPath)
513513 .withClasspath(targetDir.getPath)
514514
515- def waitForJudiciously (process : Process ): Int =
516- try process.waitFor()
517- catch case _ : InterruptedException =>
518- try if process.waitFor(5L , TimeUnit .MINUTES ) then process.exitValue() else - 2
519- finally Thread .currentThread.interrupt()
520-
521515 def compileWithJavac (fs : Array [String ]) = if (fs.nonEmpty) {
522516 val fullArgs = Array (
523517 " -encoding" , StandardCharsets .UTF_8 .name,
@@ -526,7 +520,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
526520 val process = Runtime .getRuntime.exec(" javac" +: fullArgs)
527521 val output = Source .fromInputStream(process.getErrorStream).mkString
528522
529- if waitForJudiciously( process) != 0 then Some (output)
523+ if process.waitFor( ) != 0 then Some (output)
530524 else None
531525 } else None
532526
@@ -751,11 +745,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
751745
752746 for fut <- eventualResults do
753747 try fut.get()
754- catch
755- case ee : ExecutionException if ee.getCause.isInstanceOf [InterruptedException ] =>
756- System .err.println(" Interrupted (probably running after shutdown)" )
757- ee.printStackTrace()
758- case ex : Exception =>
748+ catch case ex : Exception =>
759749 System .err.println(ex.getMessage)
760750 ex.printStackTrace()
761751
0 commit comments