use of org.apache.geode.distributed.internal.membership.gms.messages.NetworkPartitionMessage in project geode by apache.
the class GMSJoinLeave method sendNetworkPartitionMessage.
/**
* Sends a message declaring a network partition to the members of the given view via Messenger
*
* @param view
*/
void sendNetworkPartitionMessage(NetView view) {
List<InternalDistributedMember> recipients = new ArrayList<>(view.getMembers());
recipients.remove(localAddress);
NetworkPartitionMessage msg = new NetworkPartitionMessage(recipients);
try {
services.getMessenger().send(msg);
} catch (RuntimeException e) {
logger.debug("unable to send network partition message - continuing", e);
}
}
use of org.apache.geode.distributed.internal.membership.gms.messages.NetworkPartitionMessage in project geode by apache.
the class GMSJoinLeaveJUnitTest method testNetworkPartitionMessageReceived.
// Possibly modify test to check for network partition message in the force disconnect
@Test
public void testNetworkPartitionMessageReceived() throws Exception {
initMocks();
GMSJoinLeaveTestHelper.becomeCoordinatorForTest(gmsJoinLeave);
NetworkPartitionMessage message = new NetworkPartitionMessage();
gmsJoinLeave.processMessage(message);
verify(manager).forceDisconnect(isA(String.class));
}
Aggregations