tillrohrmann commented on a change in pull request #11032: [WIP][FLINK-15918]
URL: https://github.com/apache/flink/pull/11032#discussion_r375915408
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultSchedulerTest.java
 ##########
 @@ -596,6 +599,43 @@ public void suspendJobWillIncrementVertexVersions() {
                
assertTrue(executionVertexVersioner.isModified(executionVertexVersion));
        }
 
+       @Test
+       public void jobStatusIsRestartingIfOneVertexIsWaitingForRestart() {
+               final JobGraph jobGraph = singleJobVertexJobGraph(2);
+               final DefaultScheduler scheduler = 
createSchedulerAndStartScheduling(jobGraph);
+
+               final Iterator<ArchivedExecutionVertex> vertexIterator = 
scheduler.requestJob().getAllExecutionVertices().iterator();
+               final ExecutionAttemptID attemptId1 = 
vertexIterator.next().getCurrentExecutionAttempt().getAttemptId();
+               final ExecutionAttemptID attemptId2 = 
vertexIterator.next().getCurrentExecutionAttempt().getAttemptId();
+
+               scheduler.updateTaskExecutionState(new 
TaskExecutionState(jobGraph.getJobID(), attemptId1, ExecutionState.FAILED, new 
RuntimeException("expected")));
+               scheduler.updateTaskExecutionState(new 
TaskExecutionState(jobGraph.getJobID(), attemptId2, ExecutionState.FAILED, new 
RuntimeException("expected")));
+
+               taskRestartExecutor.triggerNonPeriodicScheduledTask();
 
 Review comment:
   We could check that before we process the reset execution task the 
`JobStatus` is already `RESTARTING`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to