diff --git a/dubbo-common/src/test/java/org/apache/dubbo/common/concurrent/CompletableFutureTaskTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/concurrent/CompletableFutureTaskTest.java index 2c98f9f4236..75f47416ed2 100644 --- a/dubbo-common/src/test/java/org/apache/dubbo/common/concurrent/CompletableFutureTaskTest.java +++ b/dubbo-common/src/test/java/org/apache/dubbo/common/concurrent/CompletableFutureTaskTest.java @@ -33,7 +33,6 @@ import java.util.concurrent.TimeUnit; import org.apache.dubbo.common.utils.NamedThreadFactory; -import org.junit.Ignore; import org.junit.Test; @@ -48,7 +47,7 @@ public void testCreate() throws InterruptedException { CompletableFuture completableFuture = CompletableFuture.supplyAsync(() -> { countDownLatch.countDown(); return true; - },executor); + }, executor); countDownLatch.await(); } @@ -77,7 +76,7 @@ public void testListener() throws InterruptedException { } return "hello"; - },executor); + }, executor); final CountDownLatch countDownLatch = new CountDownLatch(1); completableFuture.thenRunAsync(new Runnable() { @Override @@ -90,13 +89,11 @@ public void run() { @Test - @Ignore public void testCustomExecutor() { Executor mockedExecutor = mock(Executor.class); CompletableFuture completableFuture = CompletableFuture.supplyAsync(() -> { return 0; - }); - completableFuture.thenRunAsync(mock(Runnable.class), mockedExecutor); + }, mockedExecutor); verify(mockedExecutor, times(1)).execute(any()); } } \ No newline at end of file