philipnee commented on code in PR #13270: URL: https://github.com/apache/kafka/pull/13270#discussion_r1117261344
########## 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: Do you think It could be cleaner to use assertThrows? Something like. In this case we won't need to fail then assertEquals. (And the test message can be more accurate) ``` assertThrows(SadException.class, () -> coordinator.sadPath()); ``` -- 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