Skip to content

Commit dabd428

Browse files
biyuhaobeiwei30
authored andcommitted
re-enable testCustomExecutor (#2913)
1 parent 437c6ce commit dabd428

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

dubbo-common/src/test/java/org/apache/dubbo/common/concurrent/CompletableFutureTaskTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,13 @@ public void run() {
8888
}
8989

9090

91-
@Test
91+
@Test
9292
public void testCustomExecutor() {
9393
Executor mockedExecutor = mock(Executor.class);
9494
CompletableFuture<Integer> completableFuture = CompletableFuture.supplyAsync(() -> {
9595
return 0;
96-
}, mockedExecutor);
97-
verify(mockedExecutor, times(1)).execute(any());
96+
});
97+
completableFuture.thenRunAsync(mock(Runnable.class), mockedExecutor).whenComplete((s, e) ->
98+
verify(mockedExecutor, times(1)).execute(any(Runnable.class)));
9899
}
99100
}

0 commit comments

Comments
 (0)