You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "FrankYang0529 (via GitHub)" <gi...@apache.org> on 2025/09/13 15:20:11 UTC

Re: [PR] KAFKA-19357: AsyncConsumer#close hangs as commitAsync never completes when coordinator is missing [kafka]

FrankYang0529 commented on code in PR #19914:
URL: https://github.com/apache/kafka/pull/19914#discussion_r2346790323


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/CommitRequestManagerTest.java:
##########
@@ -1494,6 +1494,27 @@ private static void assertEmptyPendingRequests(CommitRequestManager commitReques
         assertTrue(commitRequestManager.pendingRequests.unsentOffsetCommits.isEmpty());
     }
 
+    @Test
+    public void testPollWithFatalErrorDuringCoordinatorIsEmptyAndClosing() {
+        CommitRequestManager commitRequestManager = create(true, 100);
+
+        Map<TopicPartition, OffsetAndMetadata> offsets = Collections.singletonMap(new TopicPartition("topic", 1),
+                new OffsetAndMetadata(0));

Review Comment:
   ```suggestion
           Map<TopicPartition, OffsetAndMetadata> offsets = Map.of(new TopicPartition("topic", 1),
                   new OffsetAndMetadata(0));
   ```



-- 
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-unsubscribe@kafka.apache.org

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