Yunyung commented on code in PR #19669:
URL: https://github.com/apache/kafka/pull/19669#discussion_r2083239520


##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -404,11 +405,11 @@ public void testPollReturnsRecords(GroupProtocol 
groupProtocol) {
 
         ConsumerRecords<String, String> records = (ConsumerRecords<String, 
String>) consumer.poll(Duration.ZERO);
 
-        assertEquals(records.count(), 5);
-        assertEquals(records.partitions(), Collections.singleton(tp0));
-        assertEquals(records.records(tp0).size(), 5);
-        assertEquals(records.nextOffsets().size(), 1);
-        assertEquals(records.nextOffsets().get(tp0), new OffsetAndMetadata(5, 
Optional.empty(), ""));
+        assertEquals(5, records.count());
+        assertEquals(Collections.singleton(tp0), records.partitions());

Review Comment:
   Could also clean up using Set.of.



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