Add named exception to detect when a cluster node has been quarantined by others #18758

Publish appropriate events to the current ActorSystem event stream upon remote ActorSystem shutdown or when current ActorSystem is quarantined by the remote ActorSystem.
This commit is contained in:
Eugene Dzhurinsky 2015-12-06 20:14:44 -05:00
parent 9d71142748
commit fb763040f2
7 changed files with 38 additions and 5 deletions

View file

@ -100,6 +100,7 @@ abstract class RemoteRestartedQuarantinedSpec
runOn(second) {
val addr = system.asInstanceOf[ExtendedActorSystem].provider.getDefaultAddress
val firstAddress = node(first).address
system.eventStream.subscribe(testActor, classOf[ThisActorSystemQuarantinedEvent])
val (_, ref) = identifyWithUid(first, "subject")
@ -114,6 +115,10 @@ abstract class RemoteRestartedQuarantinedSpec
}
}
expectMsgPF(10 seconds) {
case ThisActorSystemQuarantinedEvent(local, remote)
}
enterBarrier("still-quarantined")
system.awaitTermination(10.seconds)