Class AsyncTimeoutTest

java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.fault.tolerance.tck.AsyncTimeoutTest
All Implemented Interfaces:
org.testng.IHookable, org.testng.ITestNGListener

public class AsyncTimeoutTest extends org.jboss.arquillian.testng.Arquillian
Test the combination of the @Asynchronous and @Timeout annotations.
Author:
Neil Young
  • 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
    static org.jboss.shrinkwrap.api.spec.WebArchive
     
    void
    Analogous to testAsyncTimeout but using Class level rather than method level annotations.
    void
    Test that an Asynchronous Service does not throw a TimeoutException where the service completes more quickly than the specified time out.
    void
    Test that an Asynchronous Service times out as expected where the service is annotated with both the @Asynchronous and @Timeout annotations.

    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

    • AsyncTimeoutTest

      public AsyncTimeoutTest()
  • Method Details

    • deploy

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

      public void testAsyncTimeout()
      Test that an Asynchronous Service times out as expected where the service is annotated with both the @Asynchronous and @Timeout annotations. A timeout is configured for serviceA but serviceA has a 5 second sleep so that, in this case, the service should generate Timeout exceptions.
    • testAsyncNoTimeout

      public void testAsyncNoTimeout()
      Test that an Asynchronous Service does not throw a TimeoutException where the service completes more quickly than the specified time out. The service is annotated with both @Asynchronous and @Timeout. A 2 second timeout is configured for serviceB but serviceB has a 0.5 second sleep so that, in this case, the service should NOT generate Timeout exceptions.
    • testAsyncClassLevelTimeout

      public void testAsyncClassLevelTimeout()
      Analogous to testAsyncTimeout but using Class level rather than method level annotations. A timeout is configured for serviceA but serviceA has a 5 second sleep so that, in this case, the service should generate Timeout exceptions.