ahuang98 commented on code in PR #18240:
URL: https://github.com/apache/kafka/pull/18240#discussion_r1917456559


##########
raft/src/test/java/org/apache/kafka/raft/KafkaRaftClientTest.java:
##########
@@ -323,9 +324,21 @@ public void 
testInitializeAsResignedAndBecomeCandidate(boolean withKip853Rpc) th
         context.time.sleep(context.electionTimeoutMs());
         context.client.poll();
 
-        // Become candidate in a new epoch
-        assertTrue(context.client.quorum().isCandidate());
-        context.assertVotedCandidate(epoch + 1, localId);
+        // Become unattached with expired election timeout
+        assertTrue(context.client.quorum().isUnattached());
+        assertEquals(epoch + 1, context.currentEpoch());
+
+        // Become prospective
+        context.time.sleep(1);

Review Comment:
   yes!



-- 
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