tillrohrmann commented on a change in pull request #10048: [FLINK-14462][coordination] Remove JobGraph#allowQueuedScheduling flag because it is always true URL: https://github.com/apache/flink/pull/10048#discussion_r341080539
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java ########## @@ -633,6 +633,7 @@ public void testRestartWithEagerSchedulingAndSlotSharing() throws Exception { } @Test + @Ignore Review comment: I guess you need to do something like ``` public void testRestartWithSlotSharingAndNotEnoughResources() throws Exception { final int numRestarts = 10; final int parallelism = 20; final Deadline timeout = Deadline.fromNow(Duration.ofSeconds(10L)); try (SlotPool slotPool = createSlotPoolImpl()) { final Scheduler scheduler = createSchedulerWithSlots( parallelism - 1, slotPool, new LocalTaskManagerLocation()); final SlotSharingGroup sharingGroup = new SlotSharingGroup(); final JobVertex source = new JobVertex("source"); source.setInvokableClass(NoOpInvokable.class); source.setParallelism(parallelism); source.setSlotSharingGroup(sharingGroup); final JobVertex sink = new JobVertex("sink"); sink.setInvokableClass(NoOpInvokable.class); sink.setParallelism(parallelism); sink.setSlotSharingGroup(sharingGroup); sink.connectNewDataSetAsInput(source, DistributionPattern.POINTWISE, ResultPartitionType.PIPELINED_BOUNDED); TestRestartStrategy restartStrategy = new TestRestartStrategy(numRestarts, false); final ExecutionGraph eg = new ExecutionGraphTestUtils.TestingExecutionGraphBuilder(TEST_JOB_ID, source, sink) .setSlotProvider(scheduler) .setRestartStrategy(restartStrategy) .setScheduleMode(ScheduleMode.EAGER) .setAllocationTimeout(Time.milliseconds(1L)) .build(); eg.start(mainThreadExecutor); mainThreadExecutor.execute(ThrowingRunnable.unchecked(eg::scheduleForExecution)); CommonTestUtils.waitUntilCondition(() -> CompletableFuture.supplyAsync(eg::getState, mainThreadExecutor).join() == JobStatus.FAILED, timeout); // the last suppressed restart is also counted assertEquals(numRestarts + 1, CompletableFuture.supplyAsync(eg::getNumberOfRestarts, mainThreadExecutor).join().longValue()); final Throwable t = eg.getFailureCause(); if (!(t instanceof NoResourceAvailableException)) { ExceptionUtils.rethrowException(t, t.getMessage()); } } } ``` with `mainThreadExecutor = TestingComponentMainThreadExecutor.Resource().getComponentMainThreadExecutor()` I would suggest to create a new test class for this because the other tests in this class rely on `ComponentMainThreadExecutorServiceAdapter.forMainThread()`. ---------------------------------------------------------------- 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