summaryrefslogtreecommitdiff
path: root/test/files/jvm/t2530.scala
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2010-04-13 14:41:02 +0000
committerPhilipp Haller <hallerp@gmail.com>2010-04-13 14:41:02 +0000
commitbc791369f79f2d1a72a93674eb7b0f34ca58d8d1 (patch)
treea29f5941272cbe318f67f446d8202156da0ecf06 /test/files/jvm/t2530.scala
parentc54b7a99e8a4913ceee3f40631edba72c33145ec (diff)
downloadscala-bc791369f79f2d1a72a93674eb7b0f34ca58d8d1.tar.gz
scala-bc791369f79f2d1a72a93674eb7b0f34ca58d8d1.tar.bz2
scala-bc791369f79f2d1a72a93674eb7b0f34ca58d8d1.zip
Hardened actor tests. No review.
Diffstat (limited to 'test/files/jvm/t2530.scala')
-rw-r--r--test/files/jvm/t2530.scala14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/files/jvm/t2530.scala b/test/files/jvm/t2530.scala
index 642fb05a5d..c2925a92d1 100644
--- a/test/files/jvm/t2530.scala
+++ b/test/files/jvm/t2530.scala
@@ -50,6 +50,7 @@ case class Matrix(numRows: Int, numCols: Int, values: Array[Double]) {
val rows = for (j <- 0 until m) yield {
Futures.future {
+ try {
val b_j = new Array[Double](n)
var k = 0
while (k < n) { // sadly, while loops are still faster than for loops
@@ -69,13 +70,22 @@ case class Matrix(numRows: Int, numCols: Int, values: Array[Double]) {
}
//printf("future %d of %d completed.%n", j, m)
j
+ } catch {
+ case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] =>
+ e.printStackTrace()
+ }
}
}
// rows.foreach { x=> x() } // This appears to force sequential execution, so use:
// timeout is 10 years; see http://lampsvn.epfl.ch/trac/scala/ticket/2515
-
- val done = Futures.awaitAll(10*365*24*60*60*1000, rows.toArray : _*) // list to array, as varargs.
+ val done: List[Option[Any]] = try {
+ Futures.awaitAll(10*365*24*60*60*1000, rows.toArray : _*) // list to array, as varargs.
+ } catch {
+ case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] =>
+ e.printStackTrace()
+ List()
+ }
if (done.contains(None))
None