[ https://issues.apache.org/jira/browse/KAFKA-8278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin updated KAFKA-8278: ------------------------- Summary: MockConsumer.poll and MockConsumer.wakeup are both synchronized (was: MockConsumer.poll and MockConsumer.wakupe are both synchronized) > MockConsumer.poll and MockConsumer.wakeup are both synchronized > --------------------------------------------------------------- > > Key: KAFKA-8278 > URL: https://issues.apache.org/jira/browse/KAFKA-8278 > Project: Kafka > Issue Type: Bug > Components: unit tests > Affects Versions: 2.0.1 > Reporter: Kevin > Priority: Minor > > The MockConsumer's wakeup() and poll() methods are synchronized where the > normal KafkaConsumer's are not. This means that code written using the > example in the "Multi-threaded Processing" of the [KafkaConsumer > docs]([https://kafka.apache.org/20/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html]) > cannot be tested with the MockConsumer, as a long-running poll will not be > aborted by a call to wakeup() because wakeup() will not execute due to poll() > holding the object lock. -- This message was sent by Atlassian JIRA (v7.6.3#76005)