Github user GJL commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6067#discussion_r190602807
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerTest.java
 ---
    @@ -1139,6 +1147,61 @@ public void testReportAllocatedSlot() throws 
Exception {
                }
        }
     
    +   /**
    +    * Testst that the SlotManager retries allocating a slot if the 
TaskExecutor#requestSlot call
    +    * fails.
    +    */
    +   @Test
    +   public void testSlotRequestFailure() throws Exception {
    +           try (final SlotManager slotManager = 
createSlotManager(ResourceManagerId.generate(), new TestingResourceActions())) {
    +
    +                   final SlotRequest slotRequest = new SlotRequest(new 
JobID(), new AllocationID(), ResourceProfile.UNKNOWN, "foobar");
    +                   slotManager.registerSlotRequest(slotRequest);
    +
    +                   final BlockingQueue<Tuple5<SlotID, JobID, AllocationID, 
String, ResourceManagerId>> requestSlotQueue = new ArrayBlockingQueue<>(1);
    +                   final BlockingQueue<CompletableFuture<Acknowledge>> 
responseQueue = new ArrayBlockingQueue<>(1);
    +
    +                   final TestingTaskExecutorGateway 
testingTaskExecutorGateway = new TestingTaskExecutorGatewayBuilder()
    +                           
.setRequestSlotFunction(slotIDJobIDAllocationIDStringResourceManagerIdTuple5 -> 
{
    +                    
requestSlotQueue.offer(slotIDJobIDAllocationIDStringResourceManagerIdTuple5);
    --- End diff --
    
    I think you are using spaces for indentation here.


---

Reply via email to