return context;
}
- private int getElectionTimeoutCount(RaftActorBehavior follower){
+ private static int getElectionTimeoutCount(RaftActorBehavior follower){
if(follower instanceof TestFollower){
return ((TestFollower) follower).getElectionTimeoutCount();
}
Assert.assertArrayEquals("getState", bsSnapshot.toByteArray(), snapshot.getState());
assertEquals("getElectionTerm", 1, snapshot.getElectionTerm());
assertEquals("getElectionVotedFor", "leader", snapshot.getElectionVotedFor());
+ applySnapshot.getCallback().onSuccess();
List<InstallSnapshotReply> replies = MessageCollectorActor.getAllMatching(
leaderActor, InstallSnapshotReply.class);
}
- private ReplicatedLogEntry newReplicatedLogEntry(long term, long index, String data) {
+ private static ReplicatedLogEntry newReplicatedLogEntry(long term, long index, String data) {
return new MockRaftActorContext.MockReplicatedLogEntry(term, index,
new MockRaftActorContext.MockPayload(data));
}