Class FallbackTest
java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.fault.tolerance.tck.FallbackTest
- All Implemented Interfaces:
org.testng.IHookable,org.testng.ITestNGListener
public class FallbackTest
extends org.jboss.arquillian.testng.Arquillian
Test fallback was invoked correctly; fallback handler supporting CDI injection; type safety on fallback class.
- 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.WebArchivedeploy()voidAnalogous to testFallbackSuccess with Class level annotations that are inherited by serviceA but overridden by serviceB.voidTest that a method in a Fallback service is driven after the specified number of retries are executed.voidAnalogous to testFallbackMethodSuccess but serviceE has a pair of parameters.voidTest that a Fallback service is driven after the specified number of retries are executed.voidTest that a Fallback service is driven after the specified number of retries are executed.voidTest that a Fallback service is driven after the specified number of retries are executed.voidA refinement on testFallbackSuccess to test that a bean may be injected in the FallbackHandler.voidTest that a Fallback service can work alone, without other annotations.voidTest that a Fallback service can work alone, without other annotations.Methods inherited from class org.jboss.arquillian.testng.Arquillian
arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run
-
Constructor Details
-
FallbackTest
public FallbackTest()
-
-
Method Details
-
deploy
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy() -
testFallbackSuccess
public void testFallbackSuccess()Test that a Fallback service is driven after the specified number of retries are executed. Each of serviceA and serviceB specify the same FallbackHandler. The test checks that the handler has been driven in the correct ExecutionContext and that the Service has been executed the correct number of times. -
testFallbackWithBeanSuccess
public void testFallbackWithBeanSuccess()A refinement on testFallbackSuccess to test that a bean may be injected in the FallbackHandler. Each of serviceA and serviceB specify the same FallbackHandler. The test checks that the handler has been driven in the correct ExecutionContext and that the Service has been executed the correct number of times. -
testClassLevelFallbackSuccess
public void testClassLevelFallbackSuccess()Analogous to testFallbackSuccess with Class level annotations that are inherited by serviceA but overridden by serviceB. -
testFallbacktNoTimeout
public void testFallbacktNoTimeout()Test that a Fallback service is driven after the specified number of retries are executed. A timeout is configured for serviceC but the service should fail before the timeout is reached and generate a RuntimeException. After a retry the Fallback will be executed. -
testFallbackTimeout
public void testFallbackTimeout()Test that a Fallback service is driven after the specified number of retries are executed. A timeout is configured for serviceC and in this case the service should generate Timeout exceptions. After a retry the Fallback will be executed. -
testFallbackMethodSuccess
public void testFallbackMethodSuccess()Test that a method in a Fallback service is driven after the specified number of retries are executed. ServiceD specifies a method on a FallbackHandler. The test checks that the FallbackHandler method has been driven and that the Service has been executed the correct number of times. -
testFallbackMethodWithArgsSuccess
public void testFallbackMethodWithArgsSuccess()Analogous to testFallbackMethodSuccess but serviceE has a pair of parameters. ServiceE specifies a method on a FallbackHandler. The test checks that the FallbackHandler method has been driven and that the Service has been executed the correct number of times. -
testStandaloneHandlerFallback
public void testStandaloneHandlerFallback()Test that a Fallback service can work alone, without other annotations.
ServiceA fallback is driven by a class implementing FallbackHandler. ServiceA is only called once.
-
testStandaloneMethodFallback
public void testStandaloneMethodFallback()Test that a Fallback service can work alone, without other annotations.
ServiceB fallback is driven by a FallbackHandler method in the same class. ServiceB is only called once.
-