Publish member events when state change first seen, see #3075

* Remove InstantMemberEvent
This commit is contained in:
Patrik Nordwall 2013-03-05 21:05:11 +01:00
parent 5c7747e7fa
commit 5b844ec1e6
32 changed files with 145 additions and 517 deletions

View file

@ -45,16 +45,12 @@ abstract class NodeLeavingAndExitingSpec
runOn(first, third) {
val secondAddess = address(second)
val leavingLatch = TestLatch()
val exitingLatch = TestLatch()
cluster.subscribe(system.actorOf(Props(new Actor {
def receive = {
case state: CurrentClusterState
if (state.members.exists(m m.address == secondAddess && m.status == Leaving))
leavingLatch.countDown()
if (state.members.exists(m m.address == secondAddess && m.status == Exiting))
exitingLatch.countDown()
case MemberLeft(m) if m.address == secondAddess leavingLatch.countDown()
case MemberExited(m) if m.address == secondAddess exitingLatch.countDown()
case MemberRemoved(m) // not tested here
@ -70,9 +66,6 @@ abstract class NodeLeavingAndExitingSpec
val expectedAddresses = roles.toSet map address
awaitCond(clusterView.members.map(_.address) == expectedAddresses)
// Verify that 'second' node is set to LEAVING
leavingLatch.await
// Verify that 'second' node is set to EXITING
exitingLatch.await