Github user tzulitai commented on the issue:

    https://github.com/apache/flink/pull/3278
  
    @tillrohrmann thanks for your second-pass review, the tips you mentioned 
were helpful. I've incoporated all of your comments except:
    
    > Maybe you could override the DummyFlinkKafkaProducer#flush method to 
insert some latches to see when you enter and when the method is done. Then you 
could wait on the first latch and check with the latter whether the method has 
completed.
    
    I think this is over-complicating things. I don't think it makes sense to 
add ways to explicitly wait for the `flush` method to complete - it's called in 
the `snapshotState` method, so isn't it identical to waiting for the snapshot 
thread to complete?
    
    Instead, I override the `snapshotState` method and added a flag inside the 
to make sure that when the base `snapshotState` implementation returns, it 
returned after it finished calling `flush`. Whether or not `flush` blocks 
correctly is out-of-scope of these tests, because `flush` is actually an 
abstract method for Kafka version-specific concrete subclasses to implement.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to