Publish InstantMemberEvent immediately, see #2803

This commit is contained in:
Patrik Nordwall 2013-01-14 17:35:56 +01:00
parent c321f735f3
commit d07f331e78
5 changed files with 201 additions and 61 deletions

View file

@ -76,10 +76,11 @@ class ClusterSpec extends AkkaSpec(ClusterSpec.config) with ImplicitSender {
try {
cluster.subscribe(testActor, classOf[ClusterEvent.ClusterDomainEvent])
// first, is in response to the subscription
expectMsgClass(classOf[ClusterEvent.ClusterDomainEvent])
expectMsgClass(classOf[ClusterEvent.InstantClusterState])
expectMsgClass(classOf[ClusterEvent.CurrentClusterState])
cluster.publishCurrentClusterState()
expectMsgClass(classOf[ClusterEvent.ClusterDomainEvent])
expectMsgClass(classOf[ClusterEvent.CurrentClusterState])
} finally {
cluster.unsubscribe(testActor)
}
@ -87,7 +88,7 @@ class ClusterSpec extends AkkaSpec(ClusterSpec.config) with ImplicitSender {
"send CurrentClusterState to one receiver when requested" in {
cluster.sendCurrentClusterState(testActor)
expectMsgClass(classOf[ClusterEvent.ClusterDomainEvent])
expectMsgClass(classOf[ClusterEvent.CurrentClusterState])
}
}