lianetm commented on code in PR #19669:
URL: https://github.com/apache/kafka/pull/19669#discussion_r2093503258
##########
clients/src/test/java/org/apache/kafka/clients/consumer/KafkaConsumerTest.java:
##########
@@ -1842,12 +1845,12 @@ public void testOffsetOfPausedPartitions(GroupProtocol
groupProtocol) {
offsets.put(tp1, 0L);
client.prepareResponseFrom(offsetResponse(offsets, Errors.NONE),
coordinator);
- assertEquals(0,
consumer.committed(Collections.singleton(tp0)).get(tp0).offset());
+ assertEquals(0, consumer.committed(Set.of(tp0)).get(tp0).offset());
offsets.remove(tp0);
offsets.put(tp1, 0L);
client.prepareResponseFrom(offsetResponse(offsets, Errors.NONE),
coordinator);
- assertEquals(0,
consumer.committed(Collections.singleton(tp1)).get(tp1).offset());
+ assertEquals(0, consumer.committed(Set.of(tp1)).get(tp1).offset());
Review Comment:
since we're already changing to Set.of/Map.of in several places, should we
do it consistently for the whole file? (still using `singletonMap` in ln 1962
right below and others)
--
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]