tillrohrmann commented on a change in pull request #9550: [FLINK-13805]
Properly forward cause for slot removal in SlotManager
URL: https://github.com/apache/flink/pull/9550#discussion_r319026292
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerImplTest.java
##########
@@ -753,33 +742,18 @@ public void testTaskManagerSlotRequestTimeoutHandling()
throws Exception {
slotManager.registerSlotRequest(slotRequest);
- ArgumentCaptor<SlotID> slotIdCaptor =
ArgumentCaptor.forClass(SlotID.class);
-
- verify(taskExecutorGateway, times(1)).requestSlot(
- slotIdCaptor.capture(),
- eq(jobId),
- eq(allocationId),
- anyString(),
- eq(resourceManagerId),
- any(Time.class));
-
- TaskManagerSlot failedSlot =
slotManager.getSlot(slotIdCaptor.getValue());
+ final SlotID firstSlotId = slotIds.take();
+ TaskManagerSlot failedSlot =
slotManager.getSlot(firstSlotId);
// let the first attempt fail --> this should trigger a
second attempt
slotRequestFuture1.completeExceptionally(new
SlotAllocationException("Test exception."));
- verify(taskExecutorGateway, times(2)).requestSlot(
- slotIdCaptor.capture(),
- eq(jobId),
- eq(allocationId),
- anyString(),
- eq(resourceManagerId),
- any(Time.class));
-
// the second attempt succeeds
slotRequestFuture2.complete(Acknowledge.get());
- TaskManagerSlot slot =
slotManager.getSlot(slotIdCaptor.getValue());
+ final SlotID secondSlotId = slotIds.take();
Review comment:
Will add the empty check
----------------------------------------------------------------
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]
With regards,
Apache Git Services