ClusterClientSpec workin with artery #21477
This commit is contained in:
parent
03eb20e5d2
commit
9acb1feba3
1 changed files with 5 additions and 2 deletions
|
|
@ -431,10 +431,13 @@ class ClusterClientSpec extends MultiNodeSpec(ClusterClientSpec) with STMultiNod
|
|||
runOn(remainingServerRoleNames.toSeq: _*) {
|
||||
Await.ready(system.whenTerminated, 20.seconds)
|
||||
// start new system on same port
|
||||
val port = Cluster(system).selfAddress.port.get
|
||||
val sys2 = ActorSystem(
|
||||
system.name,
|
||||
ConfigFactory.parseString("akka.remote.netty.tcp.port=" + Cluster(system).selfAddress.port.get)
|
||||
.withFallback(system.settings.config))
|
||||
ConfigFactory.parseString(
|
||||
if (RARP(system).provider.remoteSettings.Artery.Enabled) s"akka.remote.artery.canonical.port=$port"
|
||||
else s"akka.remote.netty.tcp.port=$port"
|
||||
).withFallback(system.settings.config))
|
||||
Cluster(sys2).join(Cluster(sys2).selfAddress)
|
||||
val service2 = sys2.actorOf(Props(classOf[TestService], testActor), "service2")
|
||||
ClusterClientReceptionist(sys2).registerService(service2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue