Github user tillrohrmann commented on a diff in the pull request: https://github.com/apache/flink/pull/2108#discussion_r69136462 --- Diff: flink-streaming-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/AtLeastOnceProducerTest.java --- @@ -107,15 +115,16 @@ public void run() { threadB.start(); // this should block: producer.snapshotState(0, 0); - // once all pending callbacks are confirmed, we can set this marker to true - markOne.set(true); - for(int i = 0; i < 99; i++) { - producer.invoke("msg-" + i); + synchronized (threadA) { + threadA.notifyAll(); // just in case, to let the test fail faster } - // wait at most one second - threadB.join(800L); - Assert.assertFalse("Thread A reached this point too fast", threadB.isAlive()); - if(runnableError.f0 != null) { + --- End diff -- I would insert here an assertion which checks that the number of pendingRecords is `0`.
--- 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. ---