frankvicky commented on code in PR #16833: URL: https://github.com/apache/kafka/pull/16833#discussion_r1712886655
########## clients/src/test/java/org/apache/kafka/clients/consumer/internals/CommitRequestManagerTest.java: ########## @@ -1204,10 +1199,18 @@ private void testRetriable(final CommitRequestManager commitRequestManager, final List<CompletableFuture<Map<TopicPartition, OffsetAndMetadata>>> futures) { futures.forEach(f -> assertFalse(f.isDone())); - // The manager should backoff for 100ms - time.sleep(100); - commitRequestManager.poll(time.milliseconds()); + NetworkClientDelegate.PollResult poll = commitRequestManager.poll(time.milliseconds()); + assertEquals(0, poll.unsentRequests.size()); + // The manager should backoff before retry + time.sleep(retryBackoffMs); + poll = commitRequestManager.poll(time.milliseconds()); + assertEquals(1, poll.unsentRequests.size()); futures.forEach(f -> assertFalse(f.isDone())); + // Sleep util timeout + time.sleep(defaultApiTimeoutMs); + poll = commitRequestManager.poll(time.milliseconds()); + assertEquals(0, poll.unsentRequests.size()); + futures.forEach(f -> assertTrue(f.isCompletedExceptionally())); Review Comment: It seems that `future` doesn't complete exceptionally with `TimeoutException` even we sleep for timeout. I'm investigating this. -- 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