Skip to content
Permalink
Browse files
(test) Add test for BasicFuture.failed and ComplexFuture.failed (#349)
  • Loading branch information
lacinoire committed Jun 8, 2022
1 parent 9fd579c commit 55723f14145aa12dfbdae965db4c95eadaa727ad
Showing 1 changed file with 7 additions and 0 deletions.
@@ -96,4 +96,11 @@ public void completed(final Object result) {
assertThat(dependency2.isCancelled(), CoreMatchers.is(true));
}

@Test
public void testCanceledAndFailed() {
final ComplexFuture<Object> future = new ComplexFuture<>(null);
assertThat(future.cancel(), CoreMatchers.is(true));
assertThat(future.failed(new Exception()), CoreMatchers.is(false));
}

}

0 comments on commit 55723f1

Please sign in to comment.