[ https://issues.apache.org/jira/browse/FLINK-7174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16092746#comment-16092746 ]
ASF GitHub Bot commented on FLINK-7174: --------------------------------------- Github user pnowojski commented on the issue: https://github.com/apache/flink/pull/4321 -- IMO begin Mockito tests tends to repeat the implementation. Instead of testing for the effect, they tend to do the same thing as the actual code but in backwards. In other words, they have that much sense as writing the same feature/code twice and then comparing whether outcome is the same. It is valuable at first, because you make sure that you didn't make any mistakes. But after that, they make your live miserable, because so often changes in the actual code brakes them and you have to implement the same thing twice. Exactly like in this case. I added call `consumer.assignment()` call in the production code and then had to spend quite a bit of time understanding why some strange test deadlocked. To fix it, I had to implement the same change as in the production code in the mock. -- IMO ends If you have a different opinion we can leave it as it is :) It's not worth of arguing that much. There is a comment in the code, but sorry that I didn't state it more clearly in this PR itself: ``` // Without assigned partitions KafkaConsumer.poll will throw an exception ``` After version bump (and in Kafka 0.11), `KafkaConsumer.poll()` throws an `IllegalStateException` if it doesn't have assigned partitions. Thus we need skip this call in that case. > Bump dependency of Kafka 0.10.x to the latest one > ------------------------------------------------- > > Key: FLINK-7174 > URL: https://issues.apache.org/jira/browse/FLINK-7174 > Project: Flink > Issue Type: Improvement > Components: Kafka Connector > Reporter: Piotr Nowojski > Assignee: Piotr Nowojski > > We are using pretty old Kafka version for 0.10. Besides any bug fixes and > improvements that were made between 0.10.0.1 and 0.10.2.1, it 0.10.2.1 > version is more similar to 0.11.0. -- This message was sent by Atlassian JIRA (v6.4.14#64029)