- // Check if the leader has been receiving SendHeartbeat messages despite getting AppendEntriesReply
- List<SendHeartBeat> heartbeats = MessageCollectorActor.getAllMatching(leaderActor, SendHeartBeat.class);
+ for (int i = 1; i < 6; i++) {
+ // Each AppendEntriesReply could end up rescheduling the heartbeat (without the fix for bug 2733)
+ RaftActorBehavior newBehavior = leader.handleMessage(follower1Actor,
+ new AppendEntriesReply(follower1ActorId, 1, true, i, 1, (short)0));
+ assertTrue(newBehavior == leader);
+ Uninterruptibles.sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
+ }