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



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/PhysicalSlotProviderImplTest.java
##########
@@ -78,12 +76,11 @@ public void teardown() {
        }
 
        @Test
-       public void testBulkSlotAllocationFulfilledWithAvailableSlots()
-                       throws InterruptedException, 
java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException {
+       public void testBulkSlotAllocationFulfilledWithAvailableSlots() throws 
InterruptedException, ExecutionException {
                PhysicalSlotRequest request = createPhysicalSlotRequest();
                addSlotToSlotPool();
                CompletableFuture<PhysicalSlotRequest.Result> slotFuture = 
allocateSlot(request);
-               PhysicalSlotRequest.Result result = 
slotFuture.get(TIMEOUT.getSize(), TIMEOUT.getUnit());
+               PhysicalSlotRequest.Result result = slotFuture.get();

Review comment:
       What I had thought is to use `slotFuture.getNow(null)` and then doing a 
non-null check for the returned result.
   Then we can say that allocation can be fulfilled immediately without delay 
if there are available slots.




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