[hotfix] Harden SlotPoolRcpTest#testCancelSlotAllocationWithoutResourceManager


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/3d52f52e
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/3d52f52e
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/3d52f52e

Branch: refs/heads/master
Commit: 3d52f52e9e8339d168af2077449855421ea84100
Parents: ec75213
Author: Till Rohrmann <trohrm...@apache.org>
Authored: Mon Feb 19 12:59:05 2018 +0100
Committer: Till Rohrmann <trohrm...@apache.org>
Committed: Mon Feb 19 17:27:33 2018 +0100

----------------------------------------------------------------------
 .../apache/flink/runtime/jobmaster/slotpool/SlotPoolRpcTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/3d52f52e/flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPoolRpcTest.java
----------------------------------------------------------------------
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 a9be9cf..5baa3a9 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<SlotRequestId> 
currentReleaseSlotConsumer = releaseSlotConsumer;
 
+                       final CompletableFuture<Acknowledge> 
acknowledgeCompletableFuture = super.releaseSlot(slotRequestId, 
slotSharingGroupId, cause);
+
                        if (currentReleaseSlotConsumer != null) {
                                
currentReleaseSlotConsumer.accept(slotRequestId);
                        }
 
-                       return super.releaseSlot(slotRequestId, 
slotSharingGroupId, cause);
+                       return acknowledgeCompletableFuture;
                }
 
                CompletableFuture<Boolean> containsAllocatedSlot(AllocationID 
allocationId) {

Reply via email to