niket-goel commented on code in PR #12508:
URL: https://github.com/apache/kafka/pull/12508#discussion_r948248583


##########
raft/src/test/java/org/apache/kafka/raft/LeaderStateTest.java:
##########
@@ -188,13 +278,13 @@ public void testNonMonotonicHighWatermarkUpdate() {
         int node1 = 1;
         LeaderState<?> state = newLeaderState(mkSet(localId, node1), 0L);
         state.updateLocalState(time.milliseconds(), new 
LogOffsetMetadata(10L));
-        state.updateReplicaState(node1, time.milliseconds(), new 
LogOffsetMetadata(10L));
+        state.updateReplicaState(node1, time.milliseconds(), new 
LogOffsetMetadata(10L), 11L);
         assertEquals(Optional.of(new LogOffsetMetadata(10L)), 
state.highWatermark());
 
         // Follower crashes and disk is lost. It fetches an earlier offset to 
rebuild state.
         // The leader will report an error in the logs, but will not let the 
high watermark rewind
-        assertFalse(state.updateReplicaState(node1, time.milliseconds(), new 
LogOffsetMetadata(5L)));
-        assertEquals(5L, state.getVoterEndOffsets().get(node1));
+        assertFalse(state.updateReplicaState(node1, time.milliseconds(), new 
LogOffsetMetadata(5L), 6L));

Review Comment:
   Accidental update. Will fix.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to