zentol commented on a change in pull request #7303: [FLINK-10569] [tests] Get 
rid of Scheduler from valid tests
URL: https://github.com/apache/flink/pull/7303#discussion_r248275777
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java
 ##########
 @@ -155,21 +153,12 @@ public void testRestartAutomatically() throws Exception {
        public void testCancelWhileRestarting() throws Exception {
                // We want to manually control the restart and delay
                RestartStrategy restartStrategy = new 
InfiniteDelayRestartStrategy();
-               Tuple2<ExecutionGraph, Instance> executionGraphInstanceTuple = 
createExecutionGraph(restartStrategy);
-               ExecutionGraph executionGraph = executionGraphInstanceTuple.f0;
-               Instance instance = executionGraphInstanceTuple.f1;
 
-               // Kill the instance and wait for the job to restart
-               instance.markDead();
-
-               Deadline deadline = TestingUtils.TESTING_DURATION().fromNow();
-
-               while (deadline.hasTimeLeft() &&
-                               executionGraph.getState() != 
JobStatus.RESTARTING) {
-
-                       Thread.sleep(100);
-               }
+               SlotProvider slotProvider = new TestingSlotProvider(ignore -> 
new CompletableFuture<>());
+               ExecutionGraph executionGraph = 
createSimpleExecutionGraph(restartStrategy, slotProvider);
+               assertEquals(JobStatus.CREATED, executionGraph.getState());
 
+               executionGraph.scheduleForExecution();
                assertEquals(JobStatus.RESTARTING, executionGraph.getState());
 
 Review comment:
   why is the EG in a restarting state? Previously this was caused by killing 
the taskmanager, but what is causing this now?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to