Class TimeoutTest
java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.fault.tolerance.tck.TimeoutTest
- All Implemented Interfaces:
org.testng.IHookable
,org.testng.ITestNGListener
public class TimeoutTest
extends org.jboss.arquillian.testng.Arquillian
Tests to exercise Fault Tolerance Timeouts.
- 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
A test that should not time out.void
A parallel test to testGTDefaultNoTimeout where the method level Timeout annotation overrides the class level annotation.void
A test that should time out.void
A parallel test to testGTDefaultTimeout where the method level Timeout annotation overrides the class level annotation.void
A parallel test to testGTDefaultNoTimeout where the method level Timeout annotation overrides the class level annotation.void
A parallel test to testGTDefaultTimeout where the method level Timeout annotation overrides the class level annotation.void
A test that should not time out.void
A parallel test to testLTDefaultNoTimeout with class level annotation.void
A test that should time out.void
A parallel test to testLTDefaultTimeout with class level annotation.void
A test that should not time out.void
A parallel test to testNoTimeout with class level annotation.void
A test that should not time out.void
A test that should time out.void
A test to exercise the default timeout.void
A parallel test to testTimeout with class level annotation.Methods inherited from class org.jboss.arquillian.testng.Arquillian
arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run
-
Constructor Details
-
TimeoutTest
public TimeoutTest()
-
-
Method Details
-
deploy
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy() -
testTimeout
public void testTimeout()A test to exercise the default timeout. The default Fault Tolerance timeout is 1 second but serviceA will attempt to sleep for 20 seconds, so should throw a TimeoutException. -
testNoTimeout
public void testNoTimeout()A test that should not time out. The default Fault Tolerance timeout is 1 second but serviceA will attempt to sleep for only 10 milliseconds before throwing a RuntimeException. There should be no Timeout. -
testGTDefaultTimeout
public void testGTDefaultTimeout()A test that should time out. The Fault Tolerance timeout is set to a (non-default) 2 seconds but serviceB will attempt to sleep for 2.5 seconds - so longer than a default timeout. -
testGTDefaultNoTimeout
public void testGTDefaultNoTimeout()A test that should not time out. The Fault Tolerance timeout is set to 2 seconds but serviceB will attempt to sleep for 1.5 seconds - so longer than a default timeout but shorter than the timeout that has been configured, before throwing a RuntimeException. There should be no Timeout. -
testLTDefaultTimeout
public void testLTDefaultTimeout()A test that should time out. The Fault Tolerance timeout is set to a (non-default) 0.5 seconds but serviceC will attempt to sleep for 1 second - so longer than a default timeout. -
testLTDefaultNoTimeout
public void testLTDefaultNoTimeout()A test that should not time out. The Fault Tolerance timeout is set to a (non-default) 0.5 seconds but serviceC will attempt to sleep for only 10 milliseconds before throwing a RuntimeException. There should be no Timeout. -
testSecondsTimeout
public void testSecondsTimeout()A test that should time out. The Fault Tolerance timeout is set to a (non-default) 2 seconds but serviceD will attempt to sleep for 2.5 seconds - so longer than a default timeout. serviceD specifies its timeout in Seconds rather than milliseconds. -
testSecondsNoTimeout
public void testSecondsNoTimeout()A test that should not time out. The Fault Tolerance timeout is set to 2 seconds but serviceD will attempt to sleep for 1.5 seconds - so longer than a default timeout but shorter than the timeout that has been configured, before throwing a RuntimeException. There should be no Timeout. -
testTimeoutClassLevel
public void testTimeoutClassLevel()A parallel test to testTimeout with class level annotation. The default Fault Tolerance timeout is 1 second but serviceA will attempt to sleep for 20 seconds, so should throw a TimeoutException. -
testNoTimeoutClassLevel
public void testNoTimeoutClassLevel()A parallel test to testNoTimeout with class level annotation. The default Fault Tolerance timeout is 1 second but serviceA will attempt to sleep for only 10 milliseconds before throwing a RuntimeException. There should be no Timeout. -
testGTDefaultTimeoutOverride
public void testGTDefaultTimeoutOverride()A parallel test to testGTDefaultTimeout where the method level Timeout annotation overrides the class level annotation. The Fault Tolerance timeout is set to a (non-default) 2 seconds but serviceB will attempt to sleep for 2.5 seconds - so longer than a default timeout. -
testGTDefaultNoTimeoutOverride
public void testGTDefaultNoTimeoutOverride()A parallel test to testGTDefaultNoTimeout where the method level Timeout annotation overrides the class level annotation. The Fault Tolerance timeout is set to 2 seconds but serviceB will attempt to sleep for 1.5 seconds - so longer than a default timeout but shorter than the timeout that has been configured, before throwing a RuntimeException. There should be no Timeout. -
testLTDefaultTimeoutClassLevel
public void testLTDefaultTimeoutClassLevel()A parallel test to testLTDefaultTimeout with class level annotation. The Fault Tolerance timeout is set to a (non-default) 0.5 seconds but serviceA will attempt to sleep for 1 second - so longer than a default timeout. -
testLTDefaultNoTimeoutClassLevel
public void testLTDefaultNoTimeoutClassLevel()A parallel test to testLTDefaultNoTimeout with class level annotation. The Fault Tolerance timeout is set to a (non-default) 0.5 seconds but serviceC will attempt to sleep for only 10 milliseconds before throwing a RuntimeException. There should be no Timeout. -
testGTShorterTimeoutOverride
public void testGTShorterTimeoutOverride()A parallel test to testGTDefaultTimeout where the method level Timeout annotation overrides the class level annotation. The Fault Tolerance timeout is set to a (non-default) 2 seconds but serviceB will attempt to sleep for 2.5 seconds - so longer than a default timeout. -
testGTShorterNoTimeoutOverride
public void testGTShorterNoTimeoutOverride()A parallel test to testGTDefaultNoTimeout where the method level Timeout annotation overrides the class level annotation. The Fault Tolerance timeout is set to 2 seconds but serviceB will attempt to sleep for 1.5 seconds - so longer than a default timeout but shorter than the timeout that has been configured, before throwing a RuntimeException. There should be no Timeout.
-