Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4206#discussion_r124468424
  
    --- 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 --
    
    I'm a bit confused by this flag.
    The method name is `getAllRecordsFromTopic`, but it seems like we're 
escaping the loop once some record is fetched.


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

Reply via email to