org.eclipse.microprofile.fault.tolerance.tck

## Class AsyncCancellationTest

- java.lang.Object
- - org.jboss.arquillian.testng.Arquillian
  - - org.eclipse.microprofile.fault.tolerance.tck.AsyncCancellationTest

All Implemented Interfaces:
  org.testng.IHookable, org.testng.ITestNGListener

    public class AsyncCancellationTest
    extends org.jboss.arquillian.testng.Arquillian

Test that calling `cancel()` on a `Future` returned from a method annotated with `Asynchronous` is handled correctly.

According to the documentation of `Future`:

- If the task has not started running, it should not run
- If the task has started running and `mayInterruptIfRunning` is `true`, the thread should be interrupted
- When `cancel()` returns, calling `isDone()` should return `true`
- If `cancel()` returns `true`, calling `isCancelled()` should return `true`

### Nested Class Summary

### Nested classes/interfaces inherited from class org.jboss.arquillian.testng.Arquillian

`org.jboss.arquillian.testng.Arquillian.UpdateResultListener`

### Field Summary

### Fields inherited from class org.jboss.arquillian.testng.Arquillian

`ARQUILLIAN_DATA_PROVIDER`

### Constructor Summary

Constructors
Constructor and Description
`AsyncCancellationTest()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static org.jboss.shrinkwrap.api.spec.WebArchive` `deploy()`
`void` `testCancel()`
`void` `testCancelledButRemainsInBulkhead()`
`void` `testCancelledDoesNotRetry()`
`void` `testCancelledWhileQueued()`
`void` `testCancelWithoutInterrupt()`

### Methods inherited from class org.jboss.arquillian.testng.Arquillian

`arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### AsyncCancellationTest

    public AsyncCancellationTest()

### Method Detail

#### deploy

    @Deployment
    public static org.jboss.shrinkwrap.api.spec.WebArchive deploy()

#### testCancel

    public void testCancel()
                    throws InterruptedException

Throws:
  `InterruptedException`

#### testCancelWithoutInterrupt

    public void testCancelWithoutInterrupt()
                                    throws InterruptedException

Throws:
  `InterruptedException`

#### testCancelledButRemainsInBulkhead

    public void testCancelledButRemainsInBulkhead()
                                           throws InterruptedException

Throws:
  `InterruptedException`

#### testCancelledWhileQueued

    public void testCancelledWhileQueued()
                                  throws InterruptedException

Throws:
  `InterruptedException`

#### testCancelledDoesNotRetry

    public void testCancelledDoesNotRetry()
                                   throws InterruptedException

Throws:
  `InterruptedException`