diff options
author | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-10-01 16:29:40 +0000 |
---|---|---|
committer | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-10-01 16:29:40 +0000 |
commit | dbe66d06722cc31b7d898390315daf07daf05c54 (patch) | |
tree | 76eac8a3caf30defd58e4a24e0727c51c0b79bcd /test/pending | |
parent | c46666b9f4ecf77373e9fde9381aeaeba59c044f (diff) | |
download | scala-dbe66d06722cc31b7d898390315daf07daf05c54.tar.gz scala-dbe66d06722cc31b7d898390315daf07daf05c54.tar.bz2 scala-dbe66d06722cc31b7d898390315daf07daf05c54.zip |
Moved brittle timeout test to pending.
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/jvm/timeout.check | 1 | ||||
-rw-r--r-- | test/pending/jvm/timeout.scala | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/test/pending/jvm/timeout.check b/test/pending/jvm/timeout.check new file mode 100644 index 0000000000..d86bac9de5 --- /dev/null +++ b/test/pending/jvm/timeout.check @@ -0,0 +1 @@ +OK diff --git a/test/pending/jvm/timeout.scala b/test/pending/jvm/timeout.scala new file mode 100644 index 0000000000..12f1bd7bad --- /dev/null +++ b/test/pending/jvm/timeout.scala @@ -0,0 +1,33 @@ + +import scala.actors.Actor._ +import scala.actors.TIMEOUT + +object Test extends Application { + case class Timing(time: Long) + + actor { + val a = actor { + react { + case 'doTiming => + val s = sender + reactWithin(500) { + case TIMEOUT => + s ! Timing(System.currentTimeMillis) + } + } + } + + val start = System.currentTimeMillis + (a !? 'doTiming) match { + case Timing(end) => + val delay = end - start + + if (delay > 100 && delay < 900) + println("OK") + else { + println("EXPECTED: 100 < x < 900") + println("ACTUAL: "+delay) + } + } + } +} |