From a0fc43b98720099286ec5a6a03f30acaef2ae691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Bon=C3=A9r?= Date: Tue, 5 Jan 2010 09:03:31 +0100 Subject: [PATCH] Added test for Actor shutdown, RemoteServer shutdown and Cluster shutdown --- .../scala/{Test.scala => ShutdownTest.scala} | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) rename akka-core/src/test/scala/{Test.scala => ShutdownTest.scala} (52%) diff --git a/akka-core/src/test/scala/Test.scala b/akka-core/src/test/scala/ShutdownTest.scala similarity index 52% rename from akka-core/src/test/scala/Test.scala rename to akka-core/src/test/scala/ShutdownTest.scala index 9b8d9a1fa9..b782b5307b 100644 --- a/akka-core/src/test/scala/Test.scala +++ b/akka-core/src/test/scala/ShutdownTest.scala @@ -1,9 +1,8 @@ -package test +package se.scalablesolutions.akka.remote import se.scalablesolutions.akka.actor.Actor -import se.scalablesolutions.akka.remote.RemoteNode -object AkkaTest1 { +object ActorShutdownTest { def main(args: Array[String]) { class MyActor extends Actor { @@ -17,18 +16,23 @@ object AkkaTest1 { myActor.start myActor.send("test") myActor.stop - // does not exit } } // case 2 -object AkkaTest2 { +object RemoteServerAndClusterShutdownTest { def main(args: Array[String]) { - RemoteNode.start("localhost", 9999) - Thread.sleep(3000) - RemoteNode.shutdown - // does not exit + val s1 = new RemoteServer + val s2 = new RemoteServer + val s3 = new RemoteServer + s1.start("localhost", 9999) + s2.start("localhost", 9998) + s3.start("localhost", 9997) + Thread.sleep(5000) + s1.shutdown + s2.shutdown + s3.shutdown } } \ No newline at end of file