Skip to content

Commit 1175dba

Browse files
committed
[FLINK-10913] Harden ExecutionGraphRestartTest#testRestartAutomatically
Wait until all Executions reach the state DEPLOYING instead of having a resource assigned.
1 parent 3609f36 commit 1175dba

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ private static void restartAfterFailure(ExecutionGraph eg, FiniteDuration timeou
973973

974974
// Wait for deploying after async restart
975975
Deadline deadline = timeout.fromNow();
976-
waitForAllResourcesToBeAssignedAfterAsyncRestart(eg, deadline);
976+
waitUntilAllExecutionsReachDeploying(eg, deadline);
977977

978978
if (haltAfterRestart) {
979979
if (deadline.hasTimeLeft()) {
@@ -984,6 +984,13 @@ private static void restartAfterFailure(ExecutionGraph eg, FiniteDuration timeou
984984
}
985985
}
986986

987+
private static void waitUntilAllExecutionsReachDeploying(ExecutionGraph eg, Deadline deadline) throws TimeoutException {
988+
ExecutionGraphTestUtils.waitForAllExecutionsPredicate(
989+
eg,
990+
ExecutionGraphTestUtils.isInExecutionState(ExecutionState.DEPLOYING),
991+
deadline.timeLeft().toMillis());
992+
}
993+
987994
private static void waitForAllResourcesToBeAssignedAfterAsyncRestart(ExecutionGraph eg, Deadline deadline) throws TimeoutException {
988995
ExecutionGraphTestUtils.waitForAllExecutionsPredicate(
989996
eg,

0 commit comments

Comments
 (0)