lianetm commented on code in PR #14557: URL: https://github.com/apache/kafka/pull/14557#discussion_r1431620008
########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumerTest.java: ########## @@ -403,18 +402,13 @@ public void testEnsureCallbackExecutedByApplicationThread() { @Test public void testEnsureCommitSyncExecutedCommitAsyncCallbacks() { consumer = newConsumer(); - final HashMap<TopicPartition, OffsetAndMetadata> offsets = mockTopicPartitionOffset(); - MockCommitCallback callback = new MockCommitCallback(); - assertDoesNotThrow(() -> consumer.commitAsync(offsets, callback)); + KafkaException callbackException = new KafkaException("Async commit callback failed"); Review Comment: It changed because the logic for generating the `RetriableCommitException` is only in the `CommitRequestManager` now (it was partly in the AsyncKafkaConsumer `OffsetCommitCallbackTask` before). This test was asserting that a network exception thrown by the commit manager was mapped to a `RetriableCommitException`, which does not happen at the consumer level anymore. It ended up simpler though, just making sure the failure in a commit async callback is thrown in a following commit sync. -- 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