zhuzhurk commented on a change in pull request #12256:
URL: https://github.com/apache/flink/pull/12256#discussion_r436238944
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultExecutionSlotAllocatorTest.java
##########
@@ -216,13 +221,37 @@ private SlotExecutionVertexAssignment
findSlotAssignmentByExecutionVertexId(
Time timeout) {
slotAllocationRequests.add(Tuple3.of(slotRequestId,
task, slotProfile));
- if (slotAllocationDisabled) {
+ if (forceFailingSlotAllocation) {
+ return FutureUtils.completedExceptionally(new
Exception("Forced failure"));
+ } else if (slotAllocationDisabled) {
return new CompletableFuture<>();
} else {
return CompletableFuture.completedFuture(new
TestingLogicalSlotBuilder().createTestingLogicalSlot());
}
}
+ public
CompletableFuture<Collection<PhysicalSlotRequest.Result>> allocatePhysicalSlots(
Review comment:
Yes, `OneSlotPerExecutionSlotAllocatorTest` is reworked and does not use
`AllocationToggableBulkSlotProvider` anymore.
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/DefaultExecutionSlotAllocatorTest.java
##########
@@ -216,13 +221,37 @@ private SlotExecutionVertexAssignment
findSlotAssignmentByExecutionVertexId(
Time timeout) {
slotAllocationRequests.add(Tuple3.of(slotRequestId,
task, slotProfile));
- if (slotAllocationDisabled) {
+ if (forceFailingSlotAllocation) {
+ return FutureUtils.completedExceptionally(new
Exception("Forced failure"));
+ } else if (slotAllocationDisabled) {
return new CompletableFuture<>();
} else {
return CompletableFuture.completedFuture(new
TestingLogicalSlotBuilder().createTestingLogicalSlot());
}
}
+ public
CompletableFuture<Collection<PhysicalSlotRequest.Result>> allocatePhysicalSlots(
Review comment:
Yes, `OneSlotPerExecutionSlotAllocatorTest` is reworked now and does not
use `AllocationToggableBulkSlotProvider` anymore.
----------------------------------------------------------------
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]