Skip to content

Commit 72bff19

Browse files
committed
Revert dubious retry in vulpix
1 parent c533443 commit 72bff19

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

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

+3-13
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}
@@ -526,12 +526,6 @@ trait ParallelTesting extends RunnerOrchestration { self =>
526526
.and("-d", targetDir.getPath)
527527
.withClasspath(targetDir.getPath)
528528

529-
def waitForJudiciously(process: Process): Int =
530-
try process.waitFor()
531-
catch case _: InterruptedException =>
532-
try if process.waitFor(5L, TimeUnit.MINUTES) then process.exitValue() else -2
533-
finally Thread.currentThread.interrupt()
534-
535529
def compileWithJavac(fs: Array[String]) = if (fs.nonEmpty) {
536530
val fullArgs = Array(
537531
"-encoding", StandardCharsets.UTF_8.name,
@@ -540,7 +534,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
540534
val process = Runtime.getRuntime.exec("javac" +: fullArgs)
541535
val output = Source.fromInputStream(process.getErrorStream).mkString
542536

543-
if waitForJudiciously(process) != 0 then Some(output)
537+
if process.waitFor() != 0 then Some(output)
544538
else None
545539
} else None
546540

@@ -775,11 +769,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
775769

776770
for fut <- eventualResults do
777771
try fut.get()
778-
catch
779-
case ee: ExecutionException if ee.getCause.isInstanceOf[InterruptedException] =>
780-
System.err.println("Interrupted (probably running after shutdown)")
781-
ee.printStackTrace()
782-
case ex: Exception =>
772+
catch case ex: Exception =>
783773
System.err.println(ex.getMessage)
784774
ex.printStackTrace()
785775

0 commit comments

Comments
 (0)