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


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/AsyncKafkaConsumerTest.java:
##########
@@ -281,8 +281,9 @@ public void testCommitAsyncWithNullCallback() {
         final ArgumentCaptor<AsyncCommitEvent> commitEventCaptor = 
ArgumentCaptor.forClass(AsyncCommitEvent.class);
         verify(applicationEventHandler).add(commitEventCaptor.capture());
         final AsyncCommitEvent commitEvent = commitEventCaptor.getValue();
-        assertEquals(offsets, commitEvent.offsets());
-        assertDoesNotThrow(() -> commitEvent.future().complete(null));
+        assertTrue(commitEvent.offsets().isPresent());
+        assertEquals(offsets, commitEvent.offsets().get());
+        assertDoesNotThrow(() -> commitEvent.future().complete(offsets));

Review Comment:
   Agree, we should not test Java implementation which is not part of Kafka 
code. Remove `assertDoesNotThrow` for `CompletableFuture.complete()`. Thank you.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to