philipnee commented on code in PR #13678: URL: https://github.com/apache/kafka/pull/13678#discussion_r1196816858
########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinatorTest.java: ########## @@ -668,6 +695,7 @@ public void onFailure(RuntimeException e, RequestFuture<Object> future) { coordinator.markCoordinatorUnknown("test cause"); consumerClient.pollNoWakeup(); assertTrue(asyncCallbackInvoked.get()); + assertEquals(coordinator.inFlightAsyncCommits.get(), 0); Review Comment: I was wondering if we could add this to the AfterEach, but it seems like `testCommitAsyncWithUserAssignedType` would fail. ########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinator.java: ########## @@ -1223,6 +1233,26 @@ public void maybeAutoCommitOffsetsAsync(long now) { } } + private boolean waitForPendingAsyncCommits(Timer timer) { Review Comment: Hey @erikvanoosten - I took a closer look at your PR. I think your current approach is fine. ########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/ConsumerCoordinatorTest.java: ########## @@ -600,6 +601,30 @@ public void testCoordinatorNotAvailable() { assertTrue(coordinator.coordinatorUnknown()); } + @Test + public void testSyncCommitWithoutOffsetsAndPendingAsyncCommit() { Review Comment: maybe `testEnsureCompletingAsyncCommitsWhenSyncCommitWithoutOffsets` ? I thought the original naming sounds a bit like firing sync commit without offset and async commit. -- 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