You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Kevin (JIRA)" <ji...@apache.org> on 2019/04/11 11:54:00 UTC
[jira] [Created] (KAFKA-8216) MockConsumer's poll(Duration timeout)
method doesn't wait for timeout
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)