Skip to content

Commit

Permalink
re-enable testCustomExecutor (#2913)
Browse files Browse the repository at this point in the history
  • Loading branch information
biyuhao authored and beiwei30 committed Dec 10, 2018
1 parent 437c6ce commit dabd428
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ public void run() {
}


@Test
@Test
public void testCustomExecutor() {
Executor mockedExecutor = mock(Executor.class);
CompletableFuture<Integer> completableFuture = CompletableFuture.supplyAsync(() -> {
return 0;
}, mockedExecutor);
verify(mockedExecutor, times(1)).execute(any());
});
completableFuture.thenRunAsync(mock(Runnable.class), mockedExecutor).whenComplete((s, e) ->
verify(mockedExecutor, times(1)).execute(any(Runnable.class)));
}
}

0 comments on commit dabd428

Please sign in to comment.