diff --git a/akka-multi-node-testkit/src/main/scala/akka/remote/testconductor/Conductor.scala b/akka-multi-node-testkit/src/main/scala/akka/remote/testconductor/Conductor.scala index 13c34ecb9f..c48e3f1dfe 100644 --- a/akka-multi-node-testkit/src/main/scala/akka/remote/testconductor/Conductor.scala +++ b/akka-multi-node-testkit/src/main/scala/akka/remote/testconductor/Conductor.scala @@ -83,7 +83,7 @@ trait Conductor { this: TestConductorExt => name: RoleName, controllerPort: InetSocketAddress): Future[InetSocketAddress] = { if (_controller ne null) throw new RuntimeException("TestConductorServer was already started") - _controller = system.actorOf(Props(classOf[Controller], participants, controllerPort), "controller") + _controller = system.systemActorOf(Props(classOf[Controller], participants, controllerPort), "controller") import Settings.BarrierTimeout import system.dispatcher (controller ? GetSockAddr).flatMap { diff --git a/akka-multi-node-testkit/src/main/scala/akka/remote/testconductor/Player.scala b/akka-multi-node-testkit/src/main/scala/akka/remote/testconductor/Player.scala index 4ab83ec2ee..6d435124e4 100644 --- a/akka-multi-node-testkit/src/main/scala/akka/remote/testconductor/Player.scala +++ b/akka-multi-node-testkit/src/main/scala/akka/remote/testconductor/Player.scala @@ -88,8 +88,8 @@ trait Player { this: TestConductorExt => import Settings.BarrierTimeout if (_client ne null) throw new IllegalStateException("TestConductorClient already started") - _client = system.actorOf(Props(classOf[ClientFSM], name, controllerAddr), "TestConductorClient") - val a = system.actorOf(Player.waiterProps) + _client = system.systemActorOf(Props(classOf[ClientFSM], name, controllerAddr), "TestConductorClient") + val a = system.systemActorOf(Player.waiterProps, "TestConductorWaiter") (a ? client).mapTo(classTag[Done]) } @@ -279,10 +279,10 @@ private[akka] class ClientFSM(name: RoleName, controllerAddr: InetSocketAddress) stay case TerminateMsg(Left(false)) => context.system.terminate() - stay + stop() case TerminateMsg(Left(true)) => context.system.asInstanceOf[ActorSystemImpl].abort() - stay + stop() case TerminateMsg(Right(exitValue)) => System.exit(exitValue) stay // needed because Java doesn’t have Nothing