You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/02/01 03:31:33 UTC

[GitHub] [kafka] chia7712 commented on a change in pull request #10006: KAFKA-12245; Fix flaky `FetcherTest.testEarlierOffsetResetArrivesLate`

chia7712 commented on a change in pull request #10006:
URL: https://github.com/apache/kafka/pull/10006#discussion_r567544473



##########
File path: clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetcherTest.java
##########
@@ -1745,51 +1742,78 @@ public void testSeekWithInFlightReset() {
         assertEquals(237L, subscriptions.position(tp0).offset);
     }
 
-    @Timeout(10)
+    private boolean listOffsetMatchesExpectedReset(
+        TopicPartition tp,
+        OffsetResetStrategy strategy,
+        AbstractRequest request
+    ) {
+        if (!(request instanceof ListOffsetsRequest)) {
+            return false;

Review comment:
       Why not throwing exception straightforwardly when receiving those unexpected 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org