TisonKun 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_r341891476
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/scheduler/SchedulerIsolatedTasksTest.java ########## @@ -212,14 +154,12 @@ public void testScheduleWithDyingInstances() throws Exception { // cannot get another slot, since all instances are dead try { - testingSlotProvider.allocateSlot(new ScheduledUnit(getDummyTask()), false, SlotProfile.noRequirements(), TestingUtils.infiniteTime()).get(); + testingSlotProvider + .allocateSlot(new ScheduledUnit(getDummyTask()), SlotProfile.noRequirements(), TestingUtils.infiniteTime()) + .get(2000L, TimeUnit.MILLISECONDS); Review comment: I verify with the diff below ```diff @@ -155,11 +155,11 @@ public class SchedulerIsolatedTasksTest extends SchedulerTestBase { // cannot get another slot, since all instances are dead try { testingSlotProvider - .allocateSlot(new ScheduledUnit(getDummyTask()), SlotProfile.noRequirements(), TestingUtils.infiniteTime()) - .get(2000L, TimeUnit.MILLISECONDS); + .allocateSlot(new ScheduledUnit(getDummyTask()), SlotProfile.noRequirements(), Time.milliseconds(0L)) + .get(); fail("Scheduler served a slot from a dead instance"); - } catch (TimeoutException e) { - // expected + } catch (Exception e) { + assertTrue(e.getCause() instanceof TimeoutException); } // now the latest, the scheduler should have noticed (through the lazy mechanisms) ``` However, due to we `get` in main thread and schedule timeout future in main thread, we dead lock by main thread itself...Maybe we introduce a new test with `ComponentMainThreadExecutorServiceAdapter.forSingleThreadExecutor`. I will appreciate it if you can help port this test. ---------------------------------------------------------------- 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