dajac commented on a change in pull request #9630:
URL: https://github.com/apache/kafka/pull/9630#discussion_r533980942



##########
File path: 
clients/src/test/java/org/apache/kafka/clients/consumer/internals/FetcherTest.java
##########
@@ -3727,15 +3733,24 @@ public void testOffsetValidationRequestGrouping() {
             assertTrue(expectedPartitions.size() > 0);
             allRequestedPartitions.addAll(expectedPartitions);
 
-            Map<TopicPartition, EpochEndOffset> endOffsets = 
expectedPartitions.stream().collect(Collectors.toMap(
-                Function.identity(),
-                tp -> new EpochEndOffset(Errors.NONE, 4, 0)
-            ));
+            OffsetForLeaderEpochResponseData data = new 
OffsetForLeaderEpochResponseData();
+            expectedPartitions.forEach(tp -> {
+                OffsetForLeaderTopicResult topic = 
data.topics().find(tp.topic());
+                if (topic == null) {
+                    topic = new 
OffsetForLeaderTopicResult().setTopic(tp.topic());
+                    data.topics().add(topic);
+                }
+                topic.partitions().add(new OffsetForLeaderPartitionResult()

Review comment:
       I do agree with you. Using `EpochEndOffset` sounds much better.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to