showuon commented on a change in pull request #11627:
URL: https://github.com/apache/kafka/pull/11627#discussion_r777398999



##########
File path: 
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java
##########
@@ -191,6 +192,21 @@
 
     private final Collection<TopicPartition> singleTopicPartition = 
Collections.singleton(new TopicPartition(topic, 0));
 
+    private SubscriptionState subscription;
+    private Time time;
+
+    @BeforeEach
+    public void setup() {
+        this.time = new MockTime();
+        // default to reset to the earliest offset
+        this.subscription = 
createSubscriptionState(OffsetResetStrategy.EARLIEST);
+    }
+
+    private SubscriptionState createSubscriptionState(OffsetResetStrategy 
offsetResetStrategy) {
+        // use static backoff time for testing
+        return new SubscriptionState(new LogContext(), offsetResetStrategy, 
100, 100);
+    }
+

Review comment:
       Refactor the tests




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


Reply via email to