Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
  • Loading branch information
pxsalehi committed Mar 12, 2024
1 parent 3159133 commit f39edde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public Releasable start(ClusterState clusterState, Iterable<DiscoveryNode> broad
if (shouldRun.getAndSet(false)) {
startElection.run();
}
}, heartbeat -> logger.info("skip election since there is a recent heartbeat({}) from the leader", heartbeat));
}, heartbeat -> logger.info("skipping election since there is a recent heartbeat({}) from the leader", heartbeat));

return () -> shouldRun.set(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ public void testLogSkippedElectionIfRecentLeaderHeartbeat() throws Exception {
Loggers.addAppender(logger, appender);
appender.addExpectation(
new MockLogAppender.SeenEventExpectation(
"warning emitted when skipping prevoting",
"log emitted when skipping election",
AtomicRegisterPreVoteCollector.class.getCanonicalName(),
Level.INFO,
"skip election since there is a recent heartbeat*"
"skipping election since there is a recent heartbeat*"
)
);
final var fakeClock = new AtomicLong();
Expand Down

0 comments on commit f39edde

Please sign in to comment.