diff options
author | Josh Suereth <joshua.suereth@gmail.com> | 2012-11-01 10:44:30 -0400 |
---|---|---|
committer | Josh Suereth <joshua.suereth@gmail.com> | 2012-11-01 10:44:30 -0400 |
commit | 79087c79c402ababbb50fa9d1e4e78b0e52189c6 (patch) | |
tree | 210f4f0024bffd9a0061285a948079c518342983 /test/files/jvm | |
parent | 557fe9e9d2c14f363918e89056233a981dc5ef5c (diff) | |
parent | 17497cbc95d2e3cfe52eb2a1ece0d414e9308660 (diff) | |
download | scala-79087c79c402ababbb50fa9d1e4e78b0e52189c6.tar.gz scala-79087c79c402ababbb50fa9d1e4e78b0e52189c6.tar.bz2 scala-79087c79c402ababbb50fa9d1e4e78b0e52189c6.zip |
Merge branch '2.10.0-wip' of github.com:scala/scala into 2.10.0-wip
Diffstat (limited to 'test/files/jvm')
-rw-r--r-- | test/files/jvm/actmig-remote-actor-self.check | 1 | ||||
-rw-r--r-- | test/files/jvm/actmig-remote-actor-self.scala | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/test/files/jvm/actmig-remote-actor-self.check b/test/files/jvm/actmig-remote-actor-self.check new file mode 100644 index 0000000000..79d23cb337 --- /dev/null +++ b/test/files/jvm/actmig-remote-actor-self.check @@ -0,0 +1 @@ +registered diff --git a/test/files/jvm/actmig-remote-actor-self.scala b/test/files/jvm/actmig-remote-actor-self.scala new file mode 100644 index 0000000000..2b994f6081 --- /dev/null +++ b/test/files/jvm/actmig-remote-actor-self.scala @@ -0,0 +1,34 @@ +/** + * NOTE: Code snippets from this test are included in the Actor Migration Guide. In case you change + * code in these tests prior to the 2.10.0 release please send the notification to @vjovanov. + */ +import scala.actors._ +import scala.actors.migration._ +import scala.actors.remote._ +import scala.actors.remote.RemoteActor._ +import scala.concurrent._ +import scala.concurrent.duration._ + +object Test { + val finished = Promise[Boolean] + + def main(args: Array[String]): Unit = { + + // can fail with class cast exception in alive + val myAkkaActor = ActorDSL.actor(new StashingActor { + override def preStart() = { + alive(42013) + println("registered") + finished success true + context.stop(self) + } + + def receive = { + case x: Int => + } + }) + + Await.result(finished.future, Duration.Inf).toString + } + +} |