diff options
author | Paul Phillips <paulp@improving.org> | 2012-07-19 09:40:55 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-07-19 09:40:55 -0700 |
commit | 1f8a1f1be190c8ad584da523d19e0baebf295451 (patch) | |
tree | ead07f4ce76e35ebffbbe34ad9a18e00e36aec84 | |
parent | e75e862006b78d1a159c4ffb6194340492bd2de5 (diff) | |
parent | e200a8e3ffe10eb132c2cc0f5038cc42ce89414c (diff) | |
download | scala-1f8a1f1be190c8ad584da523d19e0baebf295451.tar.gz scala-1f8a1f1be190c8ad584da523d19e0baebf295451.tar.bz2 scala-1f8a1f1be190c8ad584da523d19e0baebf295451.zip |
Merge pull request #946 from paulp/girl-interrupted
Shield from InterruptedException in partest.
-rw-r--r-- | src/partest/scala/tools/partest/nest/DirectRunner.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/partest/scala/tools/partest/nest/DirectRunner.scala b/src/partest/scala/tools/partest/nest/DirectRunner.scala index 6c239721c3..c254472342 100644 --- a/src/partest/scala/tools/partest/nest/DirectRunner.scala +++ b/src/partest/scala/tools/partest/nest/DirectRunner.scala @@ -59,8 +59,12 @@ trait DirectRunner { val futures = kindFiles map (f => (f, pool submit callable(manager runTest f))) toMap pool.shutdown() - if (!pool.awaitTermination(4, TimeUnit.HOURS)) + try if (!pool.awaitTermination(4, TimeUnit.HOURS)) NestUI.warning("Thread pool timeout elapsed before all tests were complete!") + catch { case t: InterruptedException => + NestUI.warning("Thread pool was interrupted") + t.printStackTrace() + } for ((file, future) <- futures) yield { val state = if (future.isCancelled) TestState.Timeout else future.get |