Github user uce commented on a diff in the pull request:
https://github.com/apache/flink/pull/1794#discussion_r59193042
--- Diff:
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
---
@@ -1066,26 +1069,23 @@ public Void answer(InvocationOnMock invocation)
throws Throwable {
coord.startCheckpointScheduler();
- //trigger first checkpoint
- Thread.sleep(100);
-
- assertEquals(1, numCalls.get());
-
- //no new checkpoint has been triggered
- Thread.sleep(100);
- assertEquals(1, numCalls.get());
-
- //no new checkpoint has been triggered
- Thread.sleep(100);
- assertEquals(1, numCalls.get());
-
- //new checkpoint has been triggered
- Thread.sleep(300);
- assertEquals(2, numCalls.get());
+ for (int x=0; x<20; x++) {
+ Thread.sleep(100);
+ if (numCalls.get() > 0) {
--- End diff --
Since you are waiting on this condition, I would add a check after the loop
with a good error message if <= 0 in case that the call did not happen in 20 *
100 ms.
---
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.
---