zhuzhurk commented on a change in pull request #10551: [FLINK-13662][kinesis]
Relax timing requirements
URL: https://github.com/apache/flink/pull/10551#discussion_r360421356
##########
File path:
flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisProducerTest.java
##########
@@ -325,16 +325,20 @@ public void go() throws Exception {
};
moreElementsThread.start();
- moreElementsThread.trySync(deadline.timeLeftIfAny().toMillis());
assertTrue("Producer should still block, but doesn't",
moreElementsThread.isAlive());
// consume msg-2 from the queue, leaving msg-3 in the queue and
msg-4 blocked
+ while (producer.getPendingRecordFutures().size() < 2) {
Review comment:
Thanks for the explanation. Especially agreed that "In fact the same could
be said the for isAlive() checks". This, however, means that the first 2 checks
for `isAlive()` would not fail in cases it is supposed to.
Imagine that there is a bug that msg-3 does not block the thread before it
is consumed from the producer, this case is still possible to pass because the
checks may happen before the thread dies.
It is not a problem introduced by thins PR though and it is not critical. I
think it can be fixed in another task in 1.11.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services