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 true
cancel()
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
InterruptedException
public void testCancelWithoutInterrupt() throws InterruptedException
InterruptedException
public void testCancelledButRemainsInBulkhead() throws InterruptedException
InterruptedException
public void testCancelledWhileQueued() throws InterruptedException
InterruptedException
public void testCancelledDoesNotRetry() throws InterruptedException
InterruptedException
Copyright © 2016 – 2022 Eclipse Foundation. All rights reserved.
Use is subject to license terms.