kirktrue commented on code in PR #16031:
URL: https://github.com/apache/kafka/pull/16031#discussion_r1618009570


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/CommitRequestManagerTest.java:
##########
@@ -747,21 +748,19 @@ public void 
testOffsetCommitSyncTimeoutNotReturnedOnPollAndFails() {
             new TopicPartition("topic", 1),
             new OffsetAndMetadata(0));
 
-        // Send sync offset commit request that fails with retriable error.
-        long expirationTimeMs = time.milliseconds() + retryBackoffMs * 2;
-        CompletableFuture<Void> commitResult = 
commitRequestManager.commitSync(offsets, expirationTimeMs);
-        completeOffsetCommitRequestWithError(commitRequestManager, 
Errors.REQUEST_TIMED_OUT);
+        // Send sync offset commit request.
+        long deadlineMs = time.milliseconds() + retryBackoffMs * 2;
+        CompletableFuture<Void> commitResult = 
commitRequestManager.commitSync(offsets, deadlineMs);

Review Comment:
   This logic needed to be revised as the previous code relied on the 
preemptive pruning of expired requests.



-- 
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