Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-v committed Jun 20, 2024
1 parent 959a24e commit 3761548
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,26 @@ void testOnMembershipEventAddedThenLeaving() {
verify(transport, never()).send(any(), any(), anyInt(), anyInt());
}

@Test
void testOnTick() {
emitMembershipEvent(MembershipEventType.ADDED, fooMember);
failureDetector.doWork();

epochClock.advance(1);
failureDetector.doWork();
verify(transport).send(any(), any(), anyInt(), anyInt());

reset(transport);
epochClock.advance(config.pingInterval() + 1);
failureDetector.doWork();
verify(transport).send(any(), any(), anyInt(), anyInt());

reset(transport);
epochClock.advance(config.pingInterval() + 1);
failureDetector.doWork();
verify(transport).send(any(), any(), anyInt(), anyInt());
}

@Test
void testPingThenAck() {
emitMembershipEvent(MembershipEventType.ADDED, fooMember);
Expand Down

0 comments on commit 3761548

Please sign in to comment.