diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolRpcTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolRpcTest.java index a9be9cf7867ff9ea530bab8b95b050d82aea13b7..5baa3a95d23bc0542dfad24dce90bbec24f4ead0 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolRpcTest.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolRpcTest.java @@ -361,11 +361,13 @@ public class SlotPoolRpcTest extends TestLogger { @Nullable Throwable cause) { final Consumer currentReleaseSlotConsumer = releaseSlotConsumer; + final CompletableFuture acknowledgeCompletableFuture = super.releaseSlot(slotRequestId, slotSharingGroupId, cause); + if (currentReleaseSlotConsumer != null) { currentReleaseSlotConsumer.accept(slotRequestId); } - return super.releaseSlot(slotRequestId, slotSharingGroupId, cause); + return acknowledgeCompletableFuture; } CompletableFuture containsAllocatedSlot(AllocationID allocationId) {