yanghua commented on a change in pull request #7571: [FLINK-10724] Refactor
failure handling in check point coordinator
URL: https://github.com/apache/flink/pull/7571#discussion_r250844818
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
##########
@@ -505,6 +511,135 @@ public void testTriggerAndDeclineCheckpointComplex() {
}
}
+ /**
+ * This test triggers two checkpoints and then sends a decline message
which contains a task
+ * failure exception for the first checkpoint. This should discard the
first checkpoint while
+ * not triggering a new checkpoint because a later checkpoint is
already in progress.
+ */
+ @Test
+ public void testTriggerAndDeclineWithExecutionFailure() {
+ try {
+ final JobID jid = new JobID();
+ final long timestamp = System.currentTimeMillis();
+
+ // create some mock Execution vertices that receive the
checkpoint trigger messages
+ final ExecutionAttemptID attemptID1 = new
ExecutionAttemptID();
+ final ExecutionAttemptID attemptID2 = new
ExecutionAttemptID();
+ ExecutionVertex vertex1 =
mockExecutionVertex(attemptID1);
+ ExecutionVertex vertex2 =
mockExecutionVertex(attemptID2);
+
+ // set up the coordinator and validate the initial state
+ CheckpointCoordinator coord = new CheckpointCoordinator(
+ jid,
+ 600000,
+ 600000,
+ 0,
+ Integer.MAX_VALUE,
Review comment:
The parameter means `The maximum number of checkpoints that may be in
progress at the same time`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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