tillrohrmann commented on a change in pull request #13964:
URL: https://github.com/apache/flink/pull/13964#discussion_r544401099



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/DeclarativeSlotPoolBridge.java
##########
@@ -317,11 +317,12 @@ private PhysicalSlot 
reserveFreeSlotForResource(SlotRequestId slotRequestId, All
                                        timeout.toMilliseconds(),
                                        TimeUnit.MILLISECONDS,
                                        componentMainThreadExecutor)
-                               .whenComplete((physicalSlot, throwable) -> {
-                                       if (throwable instanceof 
TimeoutException) {
-                                               
timeoutPendingSlotRequest(slotRequestId);
-                                       }
-                               });
+                               .whenCompleteAsync((physicalSlot, throwable) -> 
{
+                                               if (throwable instanceof 
TimeoutException) {
+                                                       
timeoutPendingSlotRequest(slotRequestId);
+                                               }
+                                       },
+                                       componentMainThreadExecutor);

Review comment:
       Due to `whenCompleteAsync` the 
`testRequirementsDecreasedOnAllocationTimeout` now sometimes fails because the 
`timeoutPendingSlotRequest` is not run before the final assertion.




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