Github user pnowojski commented on a diff in the pull request: https://github.com/apache/flink/pull/4206#discussion_r124476235 --- Diff: flink-connectors/flink-connector-kafka-0.10/src/test/java/org/apache/flink/streaming/connectors/kafka/KafkaTestEnvironmentImpl.java --- @@ -116,6 +120,30 @@ public String getVersion() { } @Override + public <K, V> Collection<ConsumerRecord<K, V>> getAllRecordsFromTopic(Properties properties, String topic, int partition) { + ImmutableList.Builder<ConsumerRecord<K, V>> result = ImmutableList.builder(); + KafkaConsumer<K, V> consumer = new KafkaConsumer<>(properties); + consumer.assign(ImmutableList.of(new TopicPartition(topic, partition))); + + while (true) { + boolean processedAtLeastOneRecord = false; --- End diff -- No, it's other way around. We are braking the loop if after pooling for 1 second for next records we did get an empty response. Added comment.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---