Thesharing commented on a change in pull request #12917: URL: https://github.com/apache/flink/pull/12917#discussion_r459821120
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImplTest.java ########## @@ -365,19 +343,26 @@ public void testReleaseResource() throws Exception { assertTrue(slotPool.offerSlot(taskManagerLocation, taskManagerGateway, slotOffer)); - LogicalSlot slot1 = future1.get(1, TimeUnit.SECONDS); + PhysicalSlot slot1 = future1.get(1, TimeUnit.SECONDS); assertTrue(future1.isDone()); assertFalse(future2.isDone()); final CompletableFuture<?> releaseFuture = new CompletableFuture<>(); - final DummyPayload dummyPayload = new DummyPayload(releaseFuture); - slot1.tryAssignPayload(dummyPayload); + SingleLogicalSlot logicalSlot = SingleLogicalSlot.allocateFromPhysicalSlot( + requestId1, + slot1, + Locality.UNKNOWN, + new DummySlotOwner(), + true + ); + + logicalSlot.tryAssignPayload(new DummyPayload(releaseFuture)); slotPool.releaseTaskManager(taskManagerLocation.getResourceID(), null); - releaseFuture.get(); - assertFalse(slot1.isAlive()); + releaseFuture.get(1, TimeUnit.SECONDS); Review comment: I'm considering that adding a timeout in `relaseFuture.get()` will make sure this line won't block the test running indefinitely. ---------------------------------------------------------------- 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