Myasuka commented on code in PR #19331:
URL: https://github.com/apache/flink/pull/19331#discussion_r846059029
##########
flink-runtime/src/test/java/org/apache/flink/runtime/testutils/CommonTestUtils.java:
##########
@@ -310,17 +311,29 @@ public static void waitForSubtasksToFinish(
}
/** Wait for at least one successful checkpoint. */
Review Comment:
The comment is out of date once you introduce the parameter of
`numCheckpoints`.
##########
flink-tests/src/test/java/org/apache/flink/test/checkpointing/ResumeCheckpointManuallyITCase.java:
##########
@@ -288,26 +334,31 @@ private void testExternalizedCheckpoints(
private static String runJobAndGetExternalizedCheckpoint(
StateBackend backend,
- File checkpointDir,
@Nullable String externalCheckpoint,
- ClusterClient<?> client)
+ MiniClusterWithClientResource cluster,
+ RestoreMode restoreMode)
throws Exception {
- JobGraph initialJobGraph = getJobGraph(backend, externalCheckpoint);
+ JobGraph initialJobGraph = getJobGraph(backend, externalCheckpoint,
restoreMode);
NotifyingInfiniteTupleSource.countDownLatch = new
CountDownLatch(PARALLELISM);
-
- client.submitJob(initialJobGraph).get();
+ cluster.getClusterClient().submitJob(initialJobGraph).get();
// wait until all sources have been started
NotifyingInfiniteTupleSource.countDownLatch.await();
- TestUtils.waitUntilExternalizedCheckpointCreated(checkpointDir);
- client.cancel(initialJobGraph.getJobID()).get();
- TestUtils.waitUntilJobCanceled(initialJobGraph.getJobID(), client);
+ waitForCheckpoint(initialJobGraph.getJobID(),
cluster.getMiniCluster(), 2);
Review Comment:
Add a comment to describe we need at least 2 checkpoints here.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]