Make cluster fault handling more robust, see #3030
* ClusterCoreDaemon and ClusterDomainEventPublisher can't be restarted because the state would be obsolete. * Add extra supervisor level for ClusterCoreDaemon and ClusterDomainEventPublisher, which will shutdown the member on failure in children. * Publish the final removed state on postStop in ClusterDomainEventPublisher. This also simplifies the removing process.
This commit is contained in:
parent
b002bda23f
commit
cab78e5174
6 changed files with 86 additions and 32 deletions
|
|
@ -91,5 +91,15 @@ class ClusterSpec extends AkkaSpec(ClusterSpec.config) with ImplicitSender {
|
|||
expectMsgClass(classOf[ClusterEvent.CurrentClusterState])
|
||||
}
|
||||
|
||||
// this must be the last test step, since the cluster is shutdown
|
||||
"publish MemberRemoved when shutdown" in {
|
||||
cluster.subscribe(testActor, classOf[ClusterEvent.MemberRemoved])
|
||||
// first, is in response to the subscription
|
||||
expectMsgClass(classOf[ClusterEvent.CurrentClusterState])
|
||||
|
||||
cluster.shutdown()
|
||||
expectMsgType[ClusterEvent.MemberRemoved].member.address must be(selfAddress)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue