From a172e45ea3392f6fa526f64cb0e2947755f9a0c2 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Tue, 21 Mar 2017 15:26:37 +0100 Subject: Throw on timeout --- compiler/test/dotty/tools/dotc/ParallelTesting.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/test/dotty/tools/dotc') 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 } } -- cgit v1.2.3