Class ConfigTest
java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.fault.tolerance.tck.ConfigTest
- All Implemented Interfaces:
org.testng.IHookable
,org.testng.ITestNGListener
public class ConfigTest
extends org.jboss.arquillian.testng.Arquillian
Test that Fault Tolerance values configured through annotations can be overridden by configuration properties.
The test assumes that the container supports both the MicroProfile Configuration API and the MicroProfile Fault
Tolerance API. Configuration Properties are provided in the manifest of the deployed application.
- 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
Test the configuration of maxDuration on a class.void
Test the configuration of maxRetries on a class.void
Test the configuration of maxRetries on a class.void
Test the configuration of maxDuration on a specific method.void
Test the configuration of maxRetries on a specific method.Methods inherited from class org.jboss.arquillian.testng.Arquillian
arquillianAfterClass, arquillianAfterSuite, arquillianAfterTest, arquillianArgumentProvider, arquillianBeforeClass, arquillianBeforeSuite, arquillianBeforeTest, run
-
Constructor Details
-
ConfigTest
public ConfigTest()
-
-
Method Details
-
deploy
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy() -
testConfigMaxRetries
public void testConfigMaxRetries()Test the configuration of maxRetries on a specific method. The serviceA is annotated with maxRetries = 5, but a configuration property overrides it with a value of 3, so serviceA should be executed 4 times. The test assumes that the container has been configured with the property, org.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClient/serviceA/Retry/maxRetries=3 -
testClassLevelConfigMaxRetries
public void testClassLevelConfigMaxRetries()Test the configuration of maxRetries on a class. The class is annotated with maxRetries = 5, but a configuration property overrides it with a value of 3, so serviceA should be executed 4 times. The test assumes that the container has been configured with the property, org.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClassLevelClient/Retry/maxRetries=3 -
testClassLevelConfigMethodOverrideMaxRetries
public void testClassLevelConfigMethodOverrideMaxRetries()Test the configuration of maxRetries on a class. The class is annotated with maxRetries = 5. A configuration property overrides it with a value of 3 but serviceB has its own annotation and should be executed 2 times. The test assumes that the container has been configured with the property, org.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClassLevelClient/Retry/maxRetries=3 -
testConfigMaxDuration
public void testConfigMaxDuration()Test the configuration of maxDuration on a specific method. The serviceA is annotated with maxDuration=3000 but a configuration property overrides it with a value of 1000, so serviceA should be executed 11 or less times. The test assumes that the container has been configured with the property, org.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClient/serviceC/Retry/maxDuration=1000 -
testClassLevelConfigMaxDuration
public void testClassLevelConfigMaxDuration()Test the configuration of maxDuration on a class. The class is annotated with maxDuration=3000 but a configuration property overrides it with a value of 1000 so serviceA should be executed 11 or less times. The test assumes that the container has been configured with the property, org.eclipse.microprofile.fault.tolerance.tck.config.clientserver.ConfigClassLevelMaxDurationClient/Retry/maxDuration=1000
-