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


##########
clients/src/test/java/org/apache/kafka/clients/consumer/internals/CommitRequestManagerTest.java:
##########
@@ -613,15 +613,46 @@ public void testOffsetFetchRequestErroredRequests(final 
Errors error, final bool
         }
     }
 
+    @ParameterizedTest
+    @MethodSource("offsetFetchExceptionSupplier")
+    public void testOffsetFetchRequestTimeoutRequests(final Errors error,
+                                                      final boolean 
isRetriable) {
+        CommitRequestManager commitRequestManager = create(true, 100);
+        
when(coordinatorRequestManager.coordinator()).thenReturn(Optional.of(mockedNode));
+
+        Set<TopicPartition> partitions = new HashSet<>();
+        partitions.add(new TopicPartition("t1", 0));
+        List<CompletableFuture<Map<TopicPartition, OffsetAndMetadata>>> 
futures = sendAndVerifyDuplicatedOffsetFetchRequests(
+                commitRequestManager,
+                partitions,
+                1,
+                error);
+
+        if (isRetriable) {

Review Comment:
   yes, that makes sense to me. In the end it's a good point that we only have 
2 exceptions for retriables that are not considered retriable on the fetch 
path: unknown_topic and request timeout, so we could simply maybe have a helper 
isRetriableOnFetch that would return true if error.exception() instanceof 
RetriableException && !unknown_topic && !request_timeout, something like it. Up 
to you @kirktrue, but makes sense to me to get rid of the arg to maintain and 
be explicit as Bruno suggested.



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