diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-03-21 15:26:37 +0100 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-03-29 10:33:25 +0200 |
commit | a172e45ea3392f6fa526f64cb0e2947755f9a0c2 (patch) | |
tree | fd0bd7625371d720d9fea9c084ae41538cb60d11 /compiler | |
parent | 5bd99fc8c862bed33f0be0f7c05e1037bebf05a1 (diff) | |
download | dotty-a172e45ea3392f6fa526f64cb0e2947755f9a0c2.tar.gz dotty-a172e45ea3392f6fa526f64cb0e2947755f9a0c2.tar.bz2 dotty-a172e45ea3392f6fa526f64cb0e2947755f9a0c2.zip |
Throw on timeout
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/test/dotty/tools/dotc/ParallelTesting.scala | 5 |
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 } } |