RivenSun2 commented on code in PR #13270:
URL: https://github.com/apache/kafka/pull/13270#discussion_r1117936096


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinatorTest.java:
##########
@@ -1206,10 +1206,21 @@ public void testUncaughtExceptionInHeartbeatThread() 
throws Exception {
                 throw e;
             return false;
         }, heartbeatResponse(Errors.UNKNOWN_SERVER_ERROR));
+        coordinator.ensureActiveGroup();
+        mockTime.sleep(HEARTBEAT_INTERVAL_MS);
+
+        try {

Review Comment:
   I agree with you. But here, if the method coordinator.timeToNextHeartbeat(0) 
or coordinator.pollHeartbeat(mockTime.milliseconds()) is called **only once**, 
an exception may not be thrown.
   We expect that within one second, the background heartbeat thread can run 
and eventually exit abnormally.



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