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