lqjack commented on a change in pull request #15812:
URL: https://github.com/apache/flink/pull/15812#discussion_r634203296



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolInteractionsTest.java
##########
@@ -178,34 +159,34 @@ public void testExtraSlotsAreKept() throws Exception {
                 assertTrue(ExceptionUtils.stripExecutionException(e) 
instanceof TimeoutException);
             }
 
-            // wait until we have timed out the slot request
-            slotRequestTimeoutFuture.get();
-
-            assertEquals(0L, pool.getNumberOfPendingRequests());
+            testMainThreadExecutor.execute(
+                    () -> 
assertTrue(pool.getAllocatedSlotsInformation().isEmpty()));
 
-            AllocationID allocationId = allocationIdFuture.get();
-            final SlotOffer slotOffer = new SlotOffer(allocationId, 0, 
ResourceProfile.ANY);
+            final SlotOffer slotOffer = new SlotOffer(new AllocationID(), 0, 
ResourceProfile.ANY);
             final TaskManagerLocation taskManagerLocation = new 
LocalTaskManagerLocation();
             final TaskManagerGateway taskManagerGateway = new 
SimpleAckingTaskManagerGateway();
 
             testMainThreadExecutor.execute(
                     () -> 
pool.registerTaskManager(taskManagerLocation.getResourceID()));
-
             assertTrue(
                     testMainThreadExecutor.execute(
                             () ->
-                                    pool.offerSlot(
-                                            taskManagerLocation, 
taskManagerGateway, slotOffer)));
+                                    pool.offerSlots(
+                                                    taskManagerLocation,
+                                                    taskManagerGateway,
+                                                    
Lists.newArrayList(slotOffer))
+                                            != null));
 
-            assertTrue(pool.containsAvailableSlot(allocationId));
+            testMainThreadExecutor.execute(
+                    () -> 
assertTrue(pool.getAvailableSlotsInformation().isEmpty()));
         }
     }
 
-    private TestingSlotPoolImpl createAndSetUpSlotPool() throws Exception {
+    private SlotPool createAndSetUpSlotPool() throws Exception {
         return new 
SlotPoolBuilder(testMainThreadExecutor.getMainThreadExecutor()).build();
     }
 
-    private TestingSlotPoolImpl createAndSetUpSlotPoolWithoutResourceManager() 
throws Exception {
+    private SlotPool createAndSetUpSlotPoolWithoutResourceManager() throws 
Exception {

Review comment:
       I will rename it.




-- 
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:
[email protected]


Reply via email to