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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Ensure that any waiting futures get completed at the end of each test
    static org.jboss.shrinkwrap.api.spec.WebArchive
     
    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 exceptionally
    void
    Test that the stage returned by calling an asynchronous method is completed exceptionally if the method throws an exception
    void
    Test that the stage returned by calling an asynchronous method is done if called after waiting enough time to end the operation
    void
    Test that the stage returned by calling an asynchronous method is not done if called right after the operation
    void
    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
    void
    Test that the stage returned by calling a method in an asynchronous class is not done if called right after the operation

    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 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 test

      Important in case tests end early due to an exception or failure.