Skip to content

Commit b75b771

Browse files
committed
Revert dubious retry in vulpix
1 parent 59b67fc commit b75b771

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

compiler/test/dotty/tools/vulpix/ParallelTesting.scala

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import java.nio.file.{Files, NoSuchFileException, Path, Paths}
1212
import java.nio.charset.{Charset, StandardCharsets}
1313
import java.text.SimpleDateFormat
1414
import 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

1717
import scala.collection.mutable
1818
import 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

Comments
 (0)