ShivsundarR commented on code in PR #19789:
URL: https://github.com/apache/kafka/pull/19789#discussion_r2104252063
##########
clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/consumer/ShareConsumerTest.java:
##########
@@ -2977,6 +2984,28 @@ private ConsumerRecords<byte[], byte[]> waitedPoll(
return waitedPoll(shareConsumer, pollMs, recordCount, false, "",
List.of());
}
+ private List<ConsumerRecord<byte[], byte[]>>
waitedPollMultipleRecords(ShareConsumer<byte[], byte[]> shareConsumer,
+ long
pollMs,
+ int
recordCount) {
+ List<ConsumerRecord<byte[], byte[]>> records = new ArrayList<>();
+ try {
+ waitForCondition(() -> {
+ ConsumerRecords<byte[], byte[]> recs =
shareConsumer.poll(Duration.ofMillis(pollMs));
+ for (ConsumerRecord<byte[], byte[]> record : recs) {
+ records.add(record);
+ }
+ return records.size() == recordCount;
+ },
+ DEFAULT_MAX_WAIT_MS,
+ 500L,
+ () -> "failed to get records"
Review Comment:
Makes sense, I have changed the log line now. Thanks.
--
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]