use of org.apache.geode.distributed.internal.DistributionMessage in project geode by apache.
the class JGroupsMessengerJUnitTest method alertMessagesBypassFlowControl.
@Test
public void alertMessagesBypassFlowControl() throws Exception {
initMocks(false);
Message jgmsg = new Message();
DistributionMessage dmsg = mock(DistributionMessage.class);
when(dmsg.getProcessorType()).thenReturn(DistributionManager.SERIAL_EXECUTOR);
messenger.setMessageFlags(dmsg, jgmsg);
assertFalse("expected no_fc to not be set in " + jgmsg.getFlags(), jgmsg.isFlagSet(Message.Flag.NO_FC));
AlertAppender.setIsAlerting(true);
try {
messenger.setMessageFlags(dmsg, jgmsg);
assertTrue("expected no_fc to be set in " + jgmsg.getFlags(), jgmsg.isFlagSet(Message.Flag.NO_FC));
} finally {
AlertAppender.setIsAlerting(false);
}
}
Aggregations