Kevin created KAFKA-8216: ---------------------------- Summary: MockConsumer's poll(Duration timeout) method doesn't wait for timeout Key: KAFKA-8216 URL: https://issues.apache.org/jira/browse/KAFKA-8216 Project: Kafka Issue Type: Bug Components: unit tests Affects Versions: 2.0.0 Reporter: Kevin
While unit-testing a custom consumer class using the MockConsumer, I noticed that even though I'm using Consumer.poll(Duration timeout) the MockConsumer won't wait for the timeout before returning (and confirmed in the code). This weakens the unit tests, as we can't guarantee the number of times Consumer.poll (and the code that follows it in the loop) will be called. -- This message was sent by Atlassian JIRA (v7.6.3#76005)