aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/ParallelTesting.scala
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/test/dotty/tools/dotc/ParallelTesting.scala')
-rw-r--r--compiler/test/dotty/tools/dotc/ParallelTesting.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/test/dotty/tools/dotc/ParallelTesting.scala b/compiler/test/dotty/tools/dotc/ParallelTesting.scala
index 54f8effcd..1652dd9c4 100644
--- a/compiler/test/dotty/tools/dotc/ParallelTesting.scala
+++ b/compiler/test/dotty/tools/dotc/ParallelTesting.scala
@@ -12,7 +12,7 @@ import interfaces.Diagnostic.ERROR
import java.lang.reflect.InvocationTargetException
import java.nio.file.StandardCopyOption.REPLACE_EXISTING
import java.nio.file.{ Files, Path, Paths, NoSuchFileException }
-import java.util.concurrent.{ Executors => JExecutors, TimeUnit }
+import java.util.concurrent.{ Executors => JExecutors, TimeUnit, TimeoutException }
import scala.util.control.NonFatal
import scala.util.Try
import scala.collection.mutable
@@ -137,7 +137,8 @@ trait ParallelTesting {
}
pool.shutdown()
- pool.awaitTermination(10, TimeUnit.MINUTES)
+ if (!pool.awaitTermination(10, TimeUnit.MINUTES))
+ throw new TimeoutException("Compiling targets timed out")
this
}
}