diff options
author | Vojin Jovanovic <vojin.jovanovic@epfl.ch> | 2012-05-25 11:35:22 +0200 |
---|---|---|
committer | Vojin Jovanovic <vojin.jovanovic@epfl.ch> | 2012-05-25 11:35:22 +0200 |
commit | 573c00f1570eb2f978349a5fddf0433daf162d96 (patch) | |
tree | 595c760b105ff76d53d7f28d170a48e95b539f40 /test/files/jvm/actmig-react-receive.scala | |
parent | 032e8ae857f84322d90c90479d989bee2cf6a53d (diff) | |
download | scala-573c00f1570eb2f978349a5fddf0433daf162d96.tar.gz scala-573c00f1570eb2f978349a5fddf0433daf162d96.tar.bz2 scala-573c00f1570eb2f978349a5fddf0433daf162d96.zip |
Removing non-deterministic actor migration tests.
Testing these issues takes significant amounts of time so I am temporarely removing them from the master. The issue is not in the code but in the tests output order.
Diffstat (limited to 'test/files/jvm/actmig-react-receive.scala')
-rw-r--r-- | test/files/jvm/actmig-react-receive.scala | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/test/files/jvm/actmig-react-receive.scala b/test/files/jvm/actmig-react-receive.scala deleted file mode 100644 index fbc10a8d52..0000000000 --- a/test/files/jvm/actmig-react-receive.scala +++ /dev/null @@ -1,104 +0,0 @@ -import scala.actors.MigrationSystem._ -import scala.actors.Actor._ -import scala.actors.{ Actor, StashingActor, ActorRef, Props, MigrationSystem, PoisonPill } -import java.util.concurrent.{ TimeUnit, CountDownLatch } -import scala.collection.mutable.ArrayBuffer - -object Test { - - def testComposition() = { - // Snippet showing composition of receives - // React Snippet - before - val myActor = actor { - // do before - println("do before") - receive { - case x: Int => - // do task - println("do task") - } - println("do in between") - receive { - case x: String => - // do string now - println("do string") - } - println("do after") - } - myActor.start() - myActor ! 1 - myActor ! "1" - Thread.sleep(200) - // React Snippet - migrated - val myAkkaActor = MigrationSystem.actorOf(Props(() => new StashingActor { - override def preStart() = { - println("do before") - } - - def receive = ({ - case x: Int => - // do task - println("do task") - }: Receive) andThen { v => - context.become { - case x: String => - //do string - println("do string") - context.stop(self) - } - println("do in between") - } - - override def postStop() = { - println("do after") - } - - }, "default-stashing-dispatcher")) - myAkkaActor ! 1 - myAkkaActor ! "1" - Thread.sleep(200) - } - - def main(args: Array[String]) = { - // React Snippet - before - val myActor = actor { - // do before - println("do before") - receive { - case x: Int => - // do task - println("do task") - } - println("do after") - } - myActor.start() - myActor ! 1 - - Thread.sleep(200) - - // React Snippet - migrated - val myAkkaActor = MigrationSystem.actorOf(Props(() => new StashingActor { - override def preStart() = { - println("do before") - } - - def receive = { - case x: Int => - // do task - println("do task") - context.stop(self) - } - - override def postStop() = { - println("do after") - } - - }, "default-stashing-dispatcher")) - myAkkaActor ! 1 - - Thread.sleep(200) - // Starting composition test - testComposition() - - } -} |