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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.jboss.shrinkwrap.api.spec.WebArchive
deploy()
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
-
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.
-