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



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolImplTest.java
##########
@@ -510,33 +496,24 @@ public void testCheckIdleSlot() throws Exception {
 
                        slotPool.triggerCheckIdleSlot();
 
-                       final AllocationID freedSlot = 
freedSlots.poll(timeout.toMilliseconds(), TimeUnit.MILLISECONDS);
+                       final AllocationID freedSlot = 
freedSlots.poll(TIMEOUT.toMilliseconds(), TimeUnit.MILLISECONDS);
 
                        assertThat(freedSlot, Matchers.is(expiredSlotID));
                        assertThat(freedSlots.isEmpty(), Matchers.is(true));
                }
        }
 
-       private TestingSlotPoolImpl createSlotPoolImpl(ManualClock clock) {
-               return new TestingSlotPoolImpl(
-                       jobId,
-                       clock,
-                       TestingUtils.infiniteTime(),
-                       timeout,
-                       TestingUtils.infiniteTime());
-       }
-
        /**
         * Tests that idle slots which cannot be released will be discarded. 
See FLINK-11059.
         */
        @Test
        public void testDiscardIdleSlotIfReleasingFailed() throws Exception {
                final ManualClock clock = new ManualClock();
 
-               try (TestingSlotPoolImpl slotPool = createSlotPoolImpl(clock)) {
-
-                       setupSlotPool(slotPool, resourceManagerGateway, 
mainThreadExecutor);
-
+               try (TestingSlotPoolImpl slotPool = slotPoolBuilder

Review comment:
       Can we have a `createAndSetupSlotPool(clock, idleSlotTimeout)`?




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