You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2021/11/29 17:18:07 UTC

[flink] 02/04: [FLINK-25080][tests] Remove dependency on Acknowledge class

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit e37e636916e74869173e0bf75d1b9631c43f81c6
Author: Matthias Pohl <ma...@ververica.com>
AuthorDate: Fri Nov 26 12:21:10 2021 +0100

    [FLINK-25080][tests] Remove dependency on Acknowledge class
---
 .../java/org/apache/flink/runtime/concurrent/FutureUtilsTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/concurrent/FutureUtilsTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/concurrent/FutureUtilsTest.java
index 3132e0a..ce0db8d 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/concurrent/FutureUtilsTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/concurrent/FutureUtilsTest.java
@@ -21,7 +21,6 @@ package org.apache.flink.runtime.concurrent;
 import org.apache.flink.api.common.time.Time;
 import org.apache.flink.core.testutils.FlinkMatchers;
 import org.apache.flink.core.testutils.OneShotLatch;
-import org.apache.flink.runtime.messages.Acknowledge;
 import org.apache.flink.testutils.TestingUtils;
 import org.apache.flink.testutils.executor.TestExecutorResource;
 import org.apache.flink.util.ExceptionUtils;
@@ -752,10 +751,11 @@ public class FutureUtilsTest extends TestLogger {
 
     @Test
     public void testSupplyAsync() throws Exception {
-        final CompletableFuture<Acknowledge> future =
-                FutureUtils.supplyAsync(Acknowledge::get, TestingUtils.defaultExecutor());
+        final Object expectedResult = new Object();
+        final CompletableFuture<Object> future =
+                FutureUtils.supplyAsync(() -> expectedResult, TestingUtils.defaultExecutor());
 
-        assertThat(future.get(), is(Acknowledge.get()));
+        assertEquals(future.get(), expectedResult);
     }
 
     @Test