dmvk commented on a change in pull request #18332: URL: https://github.com/apache/flink/pull/18332#discussion_r783170901
########## File path: flink-tests/src/test/java/org/apache/flink/test/checkpointing/SavepointITCase.java ########## @@ -431,36 +430,48 @@ public void invoke(Long value) { .build()); cluster.before(); try { - final JobID jobID1 = new JobID(); - jobGraph.setJobID(jobID1); - cluster.getClusterClient().submitJob(jobGraph).get(); - CommonTestUtils.waitForAllTaskRunning(cluster.getMiniCluster(), jobID1, false); + final JobID firstJobId = new JobID(); + final JobGraph firstJobGraph = InstantiationUtil.clone(jobGraph); + firstJobGraph.setJobID(firstJobId); + cluster.getClusterClient().submitJob(firstJobGraph).get(); + CommonTestUtils.waitForAllTaskRunning(cluster.getMiniCluster(), firstJobId, false); // wait for some records to be processed before taking the checkpoint counter.get().await(); - final String firstCheckpoint = cluster.getMiniCluster().triggerCheckpoint(jobID1).get(); - - cluster.getClusterClient().cancel(jobID1).get(); - jobGraph.setSavepointRestoreSettings( + final String firstCheckpoint = + cluster.getMiniCluster().triggerCheckpoint(firstJobId).get(); + cluster.getClusterClient().cancel(firstJobId).get(); + CommonTestUtils.waitForJobStatus( Review comment: This would fix the test as well, even without cloning the `JobGraph`, because after this point the mutations wouldn't affect the dispatcher. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org