use of com.hazelcast.core.MemberAttributeEvent in project hazelcast by hazelcast.
the class AbstractListenersOnReconnectTest method testListenersTerminateRandomNode.
private void testListenersTerminateRandomNode() {
setupListener();
terminateRandomNode();
HazelcastClientInstanceImpl clientInstanceImpl = getHazelcastClientInstanceImpl(client);
final CountDownLatch memberAddedLatch = new CountDownLatch(1);
clientInstanceImpl.getClientClusterService().addMembershipListener(new MembershipListener() {
@Override
public void memberAdded(MembershipEvent membershipEvent) {
memberAddedLatch.countDown();
}
@Override
public void memberRemoved(MembershipEvent membershipEvent) {
}
@Override
public void memberAttributeChanged(MemberAttributeEvent memberAttributeEvent) {
}
});
factory.newHazelcastInstance();
assertOpenEventually(memberAddedLatch);
validateRegistrationsAndListenerFunctionality();
}
Aggregations