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
mayInterruptIfRunningistrue, the thread should be interrupted - When
cancel()returns, callingisDone()should returntrue - If
cancel()returnstrue, callingisCancelled()should returntrue
-
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.jboss.shrinkwrap.api.spec.WebArchivedeploy()voidvoidvoidvoidvoidMethods inherited from class org.jboss.arquillian.testng.Arquillian
arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run
-
Constructor Details
-
AsyncCancellationTest
public AsyncCancellationTest()
-
-
Method Details
-
deploy
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy() -
testCancel
- Throws:
InterruptedException
-
testCancelWithoutInterrupt
- Throws:
InterruptedException
-
testCancelledButRemainsInBulkhead
- Throws:
InterruptedException
-
testCancelledWhileQueued
- Throws:
InterruptedException
-
testCancelledDoesNotRetry
- Throws:
InterruptedException
-