More tests working on artery
* non-multi-jvm tests from akka-cluster * akka-cluster-metrics * akka-cluster-tools * akka-cluster-sharding
This commit is contained in:
parent
3b57947b1f
commit
848d56cc2f
11 changed files with 127 additions and 75 deletions
|
|
@ -21,10 +21,12 @@ import akka.actor.ActorLogging
|
|||
import akka.cluster.pubsub.DistributedPubSubMediator.Internal.Status
|
||||
import akka.cluster.pubsub.DistributedPubSubMediator.Internal.Delta
|
||||
import akka.actor.ActorSystem
|
||||
|
||||
import scala.concurrent.Await
|
||||
import akka.actor.Identify
|
||||
import akka.actor.RootActorPath
|
||||
import akka.actor.ActorIdentity
|
||||
import akka.remote.RARP
|
||||
|
||||
object DistributedPubSubRestartSpec extends MultiNodeConfig {
|
||||
val first = role("first")
|
||||
|
|
@ -136,10 +138,16 @@ class DistributedPubSubRestartSpec extends MultiNodeSpec(DistributedPubSubRestar
|
|||
|
||||
runOn(third) {
|
||||
Await.result(system.whenTerminated, 10.seconds)
|
||||
val newSystem = ActorSystem(
|
||||
system.name,
|
||||
ConfigFactory.parseString(s"akka.remote.netty.tcp.port=${Cluster(system).selfAddress.port.get}").withFallback(
|
||||
system.settings.config))
|
||||
val newSystem = {
|
||||
val port = Cluster(system).selfAddress.port.get
|
||||
val 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)
|
||||
|
||||
ActorSystem(system.name, config)
|
||||
}
|
||||
|
||||
try {
|
||||
// don't join the old cluster
|
||||
Cluster(newSystem).join(Cluster(newSystem).selfAddress)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue