Class AsynchronousCSTest
java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.fault.tolerance.tck.AsynchronousCSTest
- All Implemented Interfaces:
org.testng.IHookable
,org.testng.ITestNGListener
public class AsynchronousCSTest
extends org.jboss.arquillian.testng.Arquillian
Verify the asynchronous invocation with CompletionStage
- Author:
- Ondro Mihalyi
-
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 TypeMethodDescriptionvoid
Ensure that any waiting futures get completed at the end of each teststatic org.jboss.shrinkwrap.api.spec.WebArchive
deploy()
void
Test that the callbacks added to the initial stage are executed after the stage returned by the asynchronous method call is completed.void
Test that the stage returned by calling an asynchronous method is completed exceptionally if the method returns a stage completed exceptionallyvoid
Test that the stage returned by calling an asynchronous method is completed exceptionally if the method throws an exceptionvoid
Test that the stage returned by calling an asynchronous method is done if called after waiting enough time to end the operationvoid
Test that the stage returned by calling an asynchronous method is not done if called right after the operationvoid
Test that the stage returned by calling a method in an asynchronous class is done if called after waiting enough time to end the operationvoid
Test that the stage returned by calling a method in an asynchronous class is not done if called right after the operationMethods inherited from class org.jboss.arquillian.testng.Arquillian
arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run
-
Constructor Details
-
AsynchronousCSTest
public AsynchronousCSTest()
-
-
Method Details
-
deploy
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy() -
testAsyncIsNotFinished
public void testAsyncIsNotFinished()Test that the stage returned by calling an asynchronous method is not done if called right after the operation -
testAsyncIsFinished
public void testAsyncIsFinished()Test that the stage returned by calling an asynchronous method is done if called after waiting enough time to end the operation -
testClassLevelAsyncIsNotFinished
public void testClassLevelAsyncIsNotFinished()Test that the stage returned by calling a method in an asynchronous class is not done if called right after the operation -
testClassLevelAsyncIsFinished
public void testClassLevelAsyncIsFinished()Test that the stage returned by calling a method in an asynchronous class is done if called after waiting enough time to end the operation -
testAsyncCallbacksChained
public void testAsyncCallbacksChained()Test that the callbacks added to the initial stage are executed after the stage returned by the asynchronous method call is completed. The callbacks added inside method invocation must be called first and then callbacks added to the result of the call (on the calling thread) must be executed in the order they were added. -
testAsyncCompletesExceptionallyWhenExceptionThrown
public void testAsyncCompletesExceptionallyWhenExceptionThrown()Test that the stage returned by calling an asynchronous method is completed exceptionally if the method throws an exception -
testAsyncCompletesExceptionallyWhenCompletedExceptionally
public void testAsyncCompletesExceptionallyWhenCompletedExceptionally()Test that the stage returned by calling an asynchronous method is completed exceptionally if the method returns a stage completed exceptionally -
completeWaitingFutures
@AfterMethod public void completeWaitingFutures()Ensure that any waiting futures get completed at the end of each testImportant in case tests end early due to an exception or failure.
-