Attempt to fix multi-jvm failure when untyped system is adapted from typed system (#26780)
* Attempt to fix multi-jvm failure when untyped system is adapted from typed system Spawn system space actors instead of user space in multi-jam * Attempt to fix multi-jvm failure when untyped system is adapted from typed system in Conductor * Attempt to fix multi-jvm tests failing due to some ordering issue with systemActorOf
This commit is contained in:
parent
e7e252140f
commit
8f693998ee
2 changed files with 5 additions and 5 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue