ifndef-SleePy commented on a change in pull request #9853:
[FLINK-13904][checkpointing] Avoid competition of checkpoint triggering
URL: https://github.com/apache/flink/pull/9853#discussion_r338881552
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
##########
@@ -1466,11 +1477,24 @@ public void testSavepointsAreNotSubsumed() throws
Exception {
final JobID jid = new JobID();
final long timestamp = System.currentTimeMillis();
+ final CountDownLatch checkpointTriggeredLatch1 = new
CountDownLatch(2);
+ final CountDownLatch checkpointTriggeredLatch2 = new
CountDownLatch(2);
+ final CountDownLatch checkpointTriggeredLatch3 = new
CountDownLatch(2);
+ final CountDownLatch checkpointTriggeredLatch4 = new
CountDownLatch(2);
+ final CountDownLatch checkpointTriggeredLatch5 = new
CountDownLatch(2);
+ final CoundDownLatchCheckpointConsumers consumers =
+ new CoundDownLatchCheckpointConsumers(
+ new ArrayDeque<CountDownLatch>() {{
+ add(checkpointTriggeredLatch1);
+ add(checkpointTriggeredLatch2);
+ add(checkpointTriggeredLatch3);
+ add(checkpointTriggeredLatch4);
+ add(checkpointTriggeredLatch5); }});
Review comment:
That's really a nice suggestion!
I thought there might be some problems with a manually executor for these
cases. But after did a testing, I realized all cases work well with manually
executor. Moreover in this way, some time based case could be simplified a lot.
BTW, I keep some "dead code" for now, for example,
`TestingScheduledExecutor`, and the changes of
`SimpleAckingTaskManagerGateway`. It might be useful for the later PR or others.
----------------------------------------------------------------
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