Publish member events when state change first seen, see #3075
* Remove InstantMemberEvent
This commit is contained in:
parent
5c7747e7fa
commit
5b844ec1e6
32 changed files with 145 additions and 517 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue