summaryrefslogtreecommitdiff
path: root/test/disabled
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2010-04-12 20:17:13 +0000
committerPhilipp Haller <hallerp@gmail.com>2010-04-12 20:17:13 +0000
commitc1f1a2cfdf0b0c99c019c855a7e9c47e0c850711 (patch)
treeaf82270a8f000bc563638b69dc59f84abd563183 /test/disabled
parent734f709290a4798f9d87801a2310cf568559fe50 (diff)
downloadscala-c1f1a2cfdf0b0c99c019c855a7e9c47e0c850711.tar.gz
scala-c1f1a2cfdf0b0c99c019c855a7e9c47e0c850711.tar.bz2
scala-c1f1a2cfdf0b0c99c019c855a7e9c47e0c850711.zip
Disabled test that hangs when actors package is...
Disabled test that hangs when actors package is compiled with specialization. Review by dragos.
Diffstat (limited to 'test/disabled')
-rw-r--r--test/disabled/jvm/actor-receivewithin.check16
-rw-r--r--test/disabled/jvm/actor-receivewithin.scala69
2 files changed, 85 insertions, 0 deletions
diff --git a/test/disabled/jvm/actor-receivewithin.check b/test/disabled/jvm/actor-receivewithin.check
new file mode 100644
index 0000000000..a6a3e88c61
--- /dev/null
+++ b/test/disabled/jvm/actor-receivewithin.check
@@ -0,0 +1,16 @@
+'msg
+'msg
+'msg
+'msg
+'msg
+TIMEOUT
+TIMEOUT
+TIMEOUT
+TIMEOUT
+TIMEOUT
+'msg2
+'msg2
+'msg2
+'msg2
+'msg2
+TIMEOUT
diff --git a/test/disabled/jvm/actor-receivewithin.scala b/test/disabled/jvm/actor-receivewithin.scala
new file mode 100644
index 0000000000..a5c87c2722
--- /dev/null
+++ b/test/disabled/jvm/actor-receivewithin.scala
@@ -0,0 +1,69 @@
+import scala.actors.{Actor, TIMEOUT}
+
+object A extends Actor {
+ def act() {
+ receive {
+ case 'done =>
+ var cnt = 0
+ while (cnt < 500) {
+ cnt += 1
+ receiveWithin (0) {
+ case 'msg =>
+ if (cnt % 100 == 0)
+ println("'msg")
+ case TIMEOUT =>
+ // should not happen
+ println("FAIL1")
+ }
+ }
+ cnt = 0
+ while (cnt < 500) {
+ cnt += 1
+ receiveWithin (0) {
+ case 'msg =>
+ // should not happen
+ println("FAIL2")
+ case TIMEOUT =>
+ if (cnt % 100 == 0)
+ println("TIMEOUT")
+ }
+ }
+ B ! 'next
+ receive { case 'done => }
+ cnt = 0
+ while (cnt < 501) {
+ cnt += 1
+ receiveWithin (500) {
+ case 'msg2 =>
+ if (cnt % 100 == 0)
+ println("'msg2")
+ case TIMEOUT =>
+ println("TIMEOUT")
+ }
+ }
+ }
+ }
+}
+
+object B extends Actor {
+ def act() {
+ A.start()
+ for (_ <- 1 to 500) {
+ A ! 'msg
+ }
+ A ! 'done
+ receive {
+ case 'next =>
+ for (_ <- 1 to 500) {
+ A ! 'msg2
+ }
+ A ! 'done
+ }
+ }
+}
+
+object Test {
+ def main(args:Array[String]) {
+ B.start()
+ }
+}