guozhangwang commented on a change in pull request #8964:
URL: https://github.com/apache/kafka/pull/8964#discussion_r466082830
##########
File path:
streams/src/test/java/org/apache/kafka/streams/tests/EosTestDriver.java
##########
@@ -379,9 +379,18 @@ private static void verifyReceivedAllRecords(final
Map<TopicPartition, List<Cons
final IntegerDeserializer integerDeserializer = new
IntegerDeserializer();
for (final Map.Entry<TopicPartition, List<ConsumerRecord<byte[],
byte[]>>> partitionRecords : receivedRecords.entrySet()) {
final TopicPartition inputTopicPartition = new
TopicPartition("data", partitionRecords.getKey().partition());
- final Iterator<ConsumerRecord<byte[], byte[]>> expectedRecord =
expectedRecords.get(inputTopicPartition).iterator();
+ final List<ConsumerRecord<byte[], byte[]>>
receivedRecordsForPartition = partitionRecords.getValue();
+ final List<ConsumerRecord<byte[], byte[]>>
expectedRecordsForPartition = expectedRecords.get(inputTopicPartition);
+
+ System.out.println(partitionRecords.getKey() + " with " +
receivedRecordsForPartition.size() + ", " +
+ inputTopicPartition + " with " +
expectedRecordsForPartition.size());
+
+ final Iterator<ConsumerRecord<byte[], byte[]>> expectedRecord =
expectedRecordsForPartition.iterator();
+ RuntimeException exception = null;
+ for (final ConsumerRecord<byte[], byte[]> receivedRecord :
receivedRecordsForPartition) {
+ if (!expectedRecord.hasNext())
+ exception = new RuntimeException("Result verification
failed for " + receivedRecord + " since there's no more expected record");
Review comment:
It is failed in fact: we expect the received records is no smaller than
the expected record.
----------------------------------------------------------------
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:
[email protected]