public class AsyncCancellationTest
extends org.jboss.arquillian.testng.Arquillian
cancel() on a Future returned from a method annotated with Asynchronous is
handled correctly.
According to the documentation of Future:
mayInterruptIfRunning is true, the thread should be
interruptedcancel() returns, calling isDone() should return truecancel() returns true, calling isCancelled() should return true| Constructor and Description |
|---|
AsyncCancellationTest() |
| Modifier and Type | Method and Description |
|---|---|
static org.jboss.shrinkwrap.api.spec.WebArchive |
deploy() |
void |
testCancel() |
void |
testCancelledButRemainsInBulkhead() |
void |
testCancelledDoesNotRetry() |
void |
testCancelledWhileQueued() |
void |
testCancelWithoutInterrupt() |
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy()
public void testCancel()
throws InterruptedException
InterruptedExceptionpublic void testCancelWithoutInterrupt()
throws InterruptedException
InterruptedExceptionpublic void testCancelledButRemainsInBulkhead()
throws InterruptedException
InterruptedExceptionpublic void testCancelledWhileQueued()
throws InterruptedException
InterruptedExceptionpublic void testCancelledDoesNotRetry()
throws InterruptedException
InterruptedExceptionCopyright © 2016 – 2022 Eclipse Foundation. All rights reserved.
Use is subject to license terms.