harden RemoteReDeploymentSpec, #20180 (#23867)

This commit is contained in:
Patrik Nordwall 2017-10-30 14:47:15 +01:00 committed by Arnout Engelen
parent 2ee51c602a
commit 70f2fc9622

View file

@ -15,7 +15,10 @@ import com.typesafe.config.ConfigFactory
import akka.actor.ActorSystem
import scala.concurrent.Await
import scala.concurrent.duration._
import akka.actor.ActorIdentity
import akka.actor.ActorLogging
import akka.actor.Identify
import akka.remote.testconductor.TestConductor
import akka.testkit.TestProbe
@ -23,7 +26,7 @@ class RemoteReDeploymentConfig(artery: Boolean) extends MultiNodeConfig {
val first = role("first")
val second = role("second")
commonConfig(debugConfig(on = false).withFallback(ConfigFactory.parseString(
commonConfig(debugConfig(on = true).withFallback(ConfigFactory.parseString(
s"""akka.remote.transport-failure-detector {
threshold=0.1
heartbeat-interval=0.1s
@ -166,6 +169,20 @@ abstract class RemoteReDeploymentMultiJvmSpec(multiNodeConfig: RemoteReDeploymen
enterBarrier("cable-cut")
// make sure ordinary communication works
runOn(second) {
val sel = sys.actorSelection(node(first) / "user" / "echo")
val p = TestProbe()(sys)
p.within(15.seconds) {
p.awaitAssert {
sel.tell(Identify("id-echo-again"), p.ref)
p.expectMsgType[ActorIdentity](3.seconds).ref.isDefined should ===(true)
}
}
}
enterBarrier("ready-again")
// add new echo, parent, and (if needed) Hello actors:
runOn(second) {
val p = TestProbe()(sys)