zhuzhurk commented on a change in pull request #13641:
URL: https://github.com/apache/flink/pull/13641#discussion_r533275742



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphNotEnoughResourceTest.java
##########
@@ -113,29 +119,28 @@ public void 
testRestartWithSlotSharingAndNotEnoughResources() throws Exception {
                        final JobGraph jobGraph = new JobGraph(TEST_JOB_ID, 
"Test Job", source, sink);
                        jobGraph.setScheduleMode(ScheduleMode.EAGER);
 
-                       TestRestartStrategy restartStrategy = new 
TestRestartStrategy(numRestarts, false);
+                       RestartBackoffTimeStrategy restartStrategy = new 
FixedDelayRestartBackoffTimeStrategy.FixedDelayRestartBackoffTimeStrategyFactory(numRestarts,
 0).create();
 
-                       final ExecutionGraph eg = TestingExecutionGraphBuilder
-                               .newBuilder()
-                               .setJobGraph(jobGraph)
-                               .setSlotProvider(scheduler)
-                               .setRestartStrategy(restartStrategy)
-                               .setAllocationTimeout(Time.milliseconds(1L))
+                       final SchedulerBase schedulerNG = SchedulerTestingUtils
+                               
.newSchedulerBuilderWithDefaultSlotAllocator(jobGraph, scheduler, 
Time.milliseconds(1))
+                               .setRestartBackoffTimeStrategy(restartStrategy)
+                               .setSchedulingStrategyFactory(new 
EagerSchedulingStrategy.Factory())
+                               .setFailoverStrategyFactory(new 
RestartAllFailoverStrategy.Factory())
                                .build();
+                       final ExecutionGraph eg = 
schedulerNG.getExecutionGraph();

Review comment:
       done.




----------------------------------------------------------------
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


Reply via email to