Code review comment: Could you please explain why this `sleep` is needed?

Code before review:
public void testSwitchFromDisablingToEnablingInClaimMode() throws Exception {
File firstCheckpointFolder = TEMPORARY_FOLDER.newFolder();
MiniCluster miniCluster = cluster.getMiniCluster();
StreamExecutionEnvironment env1 =
getEnv(delegatedStateBackend, firstCheckpointFolder, false, 100, 600000);
JobGraph firstJobGraph = buildJobGraph(env1);
miniCluster.submitJob(firstJobGraph).get();
waitForAllTaskRunning(miniCluster, firstJobGraph.getJobID(), true);
miniCluster.triggerCheckpoint(firstJobGraph.getJobID()).get();
miniCluster.cancelJob(firstJobGraph.getJobID()).get();
String firstRestorePath =
getLatestCompletedCheckpointPath(firstJobGraph.getJobID(), miniCluster).get();
File secondCheckpointFolder = TEMPORARY_FOLDER.newFolder();
StreamExecutionEnvironment env2 =
getEnv(delegatedStateBackend, secondCheckpointFolder, true, 100, 60000);
JobGraph secondJobGraph = buildJobGraph(env2);
setSavepointRestoreSettings(secondJobGraph, firstRestorePath);
miniCluster.submitJob(secondJobGraph).get();
waitForAllTaskRunning(miniCluster, secondJobGraph.getJobID(), true);
miniCluster.triggerCheckpoint(secondJobGraph.getJobID()).get();
miniCluster.cancelJob(secondJobGraph.getJobID()).get();
String secondRestorePath =
getLatestCompletedCheckpointPath(secondJobGraph.getJobID(), miniCluster).get();
File thirdCheckpointFolder = TEMPORARY_FOLDER.newFolder();
StreamExecutionEnvironment env3 =
getEnv(delegatedStateBackend, thirdCheckpointFolder, true, 100, 100);
JobGraph thirdJobGraph = buildJobGraph(env3);
setSavepointRestoreSettings(thirdJobGraph, secondRestorePath);
miniCluster.submitJob(thirdJobGraph).get();
waitForAllTaskRunning(miniCluster, thirdJobGraph.getJobID(), true);
Thread.sleep(500);
miniCluster.triggerCheckpoint(thirdJobGraph.getJobID()).get();
miniCluster.cancelJob(thirdJobGraph.getJobID()).get();
}

Line under review: Thread.sleep(500);

Code after addressing the review:
public void testSwitchFromDisablingToEnablingInClaimMode() throws Exception {
File firstCheckpointFolder = TEMPORARY_FOLDER.newFolder();
MiniCluster miniCluster = cluster.getMiniCluster();
StreamExecutionEnvironment env1 =
getEnv(delegatedStateBackend, firstCheckpointFolder, false, 100, 600000);
JobGraph firstJobGraph = buildJobGraph(env1);
miniCluster.submitJob(firstJobGraph).get();
waitForAllTaskRunning(miniCluster, firstJobGraph.getJobID(), true);
miniCluster.triggerCheckpoint(firstJobGraph.getJobID()).get();
miniCluster.cancelJob(firstJobGraph.getJobID()).get();
String firstRestorePath =
getLatestCompletedCheckpointPath(firstJobGraph.getJobID(), miniCluster).get();
File secondCheckpointFolder = TEMPORARY_FOLDER.newFolder();
StreamExecutionEnvironment env2 =
getEnv(delegatedStateBackend, secondCheckpointFolder, true, 100, 600000);
JobGraph secondJobGraph = buildJobGraph(env2);
setSavepointRestoreSettings(secondJobGraph, firstRestorePath);
miniCluster.submitJob(secondJobGraph).get();
waitForAllTaskRunning(miniCluster, secondJobGraph.getJobID(), true);
miniCluster.triggerCheckpoint(secondJobGraph.getJobID()).get();
miniCluster.cancelJob(secondJobGraph.getJobID()).get();
String secondRestorePath =
getLatestCompletedCheckpointPath(secondJobGraph.getJobID(), miniCluster).get();
File thirdCheckpointFolder = TEMPORARY_FOLDER.newFolder();
StreamExecutionEnvironment env3 =
getEnv(delegatedStateBackend, thirdCheckpointFolder, true, 100, 100);
JobGraph thirdJobGraph = buildJobGraph(env3);
setSavepointRestoreSettings(thirdJobGraph, secondRestorePath);
miniCluster.submitJob(thirdJobGraph).get();
waitForAllTaskRunning(miniCluster, thirdJobGraph.getJobID(), true);
miniCluster.triggerCheckpoint(thirdJobGraph.getJobID()).get();
miniCluster.cancelJob(thirdJobGraph.getJobID()).get();
}