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

iluo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git


The following commit(s) were added to refs/heads/master by this push:
     new 38c2151  re-enable testCustomExecutor  (#2917)
38c2151 is described below

commit 38c2151857ca5af1adbf739b82768ac2514824a5
Author: gude <[email protected]>
AuthorDate: Mon Dec 10 16:19:19 2018 +0800

    re-enable testCustomExecutor  (#2917)
    
    * fix testCustomExecutor
    
    * fix ci
---
 .../dubbo/common/concurrent/CompletableFutureTaskTest.java       | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

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 2c98f9f..75f4741 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.ThreadPoolExecutor;
 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 class CompletableFutureTaskTest {
         CompletableFuture<Boolean> completableFuture = 
CompletableFuture.supplyAsync(() -> {
             countDownLatch.countDown();
             return true;
-        },executor);
+        }, executor);
         countDownLatch.await();
     }
 
@@ -77,7 +76,7 @@ public class CompletableFutureTaskTest {
             }
             return "hello";
 
-        },executor);
+        }, executor);
         final CountDownLatch countDownLatch = new CountDownLatch(1);
         completableFuture.thenRunAsync(new Runnable() {
             @Override
@@ -90,13 +89,11 @@ public class CompletableFutureTaskTest {
 
 
     @Test
-    @Ignore
     public void testCustomExecutor() {
         Executor mockedExecutor = mock(Executor.class);
         CompletableFuture<Integer> completableFuture = 
CompletableFuture.supplyAsync(() -> {
             return 0;
-        });
-        completableFuture.thenRunAsync(mock(Runnable.class), mockedExecutor);
+        }, mockedExecutor);
         verify(mockedExecutor, times(1)).execute(any());
     }
 }
\ No newline at end of file

Reply via email to