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

    https://github.com/apache/flink/pull/4321#discussion_r128180697
  
    --- Diff: 
flink-connectors/flink-connector-kafka-0.9/src/test/java/org/apache/flink/streaming/connectors/kafka/internal/KafkaConsumerThreadTest.java
 ---
    @@ -744,17 +745,21 @@ void 
reassignPartitions(List<KafkaTopicPartitionState<TopicPartition>> newPartit
                        final OneShotLatch continueAssignmentLatch) {
     
                final KafkaConsumer<byte[], byte[]> mockConsumer = 
mock(KafkaConsumer.class);
    +           final AtomicInteger callCounter = new AtomicInteger();
    +
                when(mockConsumer.assignment()).thenAnswer(new Answer<Object>() 
{
                        @Override
                        public Object answer(InvocationOnMock invocationOnMock) 
throws Throwable {
    -                           if (midAssignmentLatch != null) {
    -                                   midAssignmentLatch.trigger();
    -                           }
    +                           // first call is not the one that we want to 
catch... we all love mocks, don't we?
    --- End diff --
    
    Lets remove the last part about loving mocks ;-) I do understand your 
argument on mocking, though.


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