Skip to content

Commit c2d823c

Browse files
gudeggkhanimteyaz
authored andcommitted
re-enable testCustomExecutor (apache#2917)
* fix testCustomExecutor * fix ci
1 parent 83c40a5 commit c2d823c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import java.util.concurrent.TimeUnit;
3434

3535
import org.apache.dubbo.common.utils.NamedThreadFactory;
36-
import org.junit.Ignore;
3736
import org.junit.Test;
3837

3938

@@ -48,7 +47,7 @@ public void testCreate() throws InterruptedException {
4847
CompletableFuture<Boolean> completableFuture = CompletableFuture.supplyAsync(() -> {
4948
countDownLatch.countDown();
5049
return true;
51-
},executor);
50+
}, executor);
5251
countDownLatch.await();
5352
}
5453

@@ -77,7 +76,7 @@ public void testListener() throws InterruptedException {
7776
}
7877
return "hello";
7978

80-
},executor);
79+
}, executor);
8180
final CountDownLatch countDownLatch = new CountDownLatch(1);
8281
completableFuture.thenRunAsync(new Runnable() {
8382
@Override
@@ -90,13 +89,11 @@ public void run() {
9089

9190

9291
@Test
93-
@Ignore
9492
public void testCustomExecutor() {
9593
Executor mockedExecutor = mock(Executor.class);
9694
CompletableFuture<Integer> completableFuture = CompletableFuture.supplyAsync(() -> {
9795
return 0;
98-
});
99-
completableFuture.thenRunAsync(mock(Runnable.class), mockedExecutor);
96+
}, mockedExecutor);
10097
verify(mockedExecutor, times(1)).execute(any());
10198
}
10299
}

0 commit comments

Comments
 (0)