Package org.eclipse.microprofile.fault.tolerance.tck

# Class RetryTest

java.lang.Object
org.jboss.arquillian.testng.Arquillian
org.eclipse.microprofile.fault.tolerance.tck.RetryTest

All Implemented Interfaces:
  `org.testng.IHookable`, `org.testng.ITestNGListener`

public class RetryTest extends org.jboss.arquillian.testng.Arquillian
Test when maxDuration is reached, no more retries will be perfomed. Test the delay and jitter were taken into consideration.

Author:
  Emily Jiang

## 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
`RetryTest()`

## Method Summary

Modifier and Type
Method
Description
`static org.jboss.shrinkwrap.api.spec.WebArchive`
`deploy()`
`void`
`testClassLevelRetryMaxDuration()`
Analogous to testRetryMaxDuration, testing whether the `@Retry` annotation on method serviceB overrides the Class level `@Retry` annotation.
`void`
`testClassLevelRetryMaxDurationSeconds()`
Analogous to testRetryMaxDurationSeconds, testing whether the `@Retry` annotation on method serviceB overrides the Class level `@Retry` annotation.
`void`
`testClassLevelRetryMaxRetries()`
Analogous to testRetryMaxRetries but using a Class level rather than method level annotation.
`void`
`testRetryMaxDuration()`
`void`
`testRetryMaxDurationSeconds()`
`void`
`testRetryMaxRetries()`
Test maxRetries.
`void`
`testRetryWithDelay()`
`void`
`testRetryWithNoDelayAndJitter()`
Testing whether the `@Retry` annotation on method serviceB overrides the Class level `@Retry` annotation.

### 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

### RetryTest

public RetryTest()

## Method Details

### deploy

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

### testRetryMaxRetries

public void testRetryMaxRetries()
Test maxRetries. As serviceA is annotated with maxRetries = 5, serviceA should be executed 6 times.

### testRetryMaxDuration

public void testRetryMaxDuration()

### testRetryMaxDurationSeconds

public void testRetryMaxDurationSeconds()

### testRetryWithDelay

public void testRetryWithDelay()

### testRetryWithNoDelayAndJitter

public void testRetryWithNoDelayAndJitter()
Testing whether the `@Retry` annotation on method serviceB overrides the Class level `@Retry` annotation. Delay is 0 and jitter 400ms. Invocation takes 3200ms and effective delay must be between 0 and 400ms.

### testClassLevelRetryMaxRetries

public void testClassLevelRetryMaxRetries()
Analogous to testRetryMaxRetries but using a Class level rather than method level annotation. With maxRetries = 2, serviceA should be executed 3 times.

### testClassLevelRetryMaxDuration

public void testClassLevelRetryMaxDuration()
Analogous to testRetryMaxDuration, testing whether the `@Retry` annotation on method serviceB overrides the Class level `@Retry` annotation. Ensure that serviceB is executed more than the maxRetries of 2 specified at the Class level.

### testClassLevelRetryMaxDurationSeconds

public void testClassLevelRetryMaxDurationSeconds()
Analogous to testRetryMaxDurationSeconds, testing whether the `@Retry` annotation on method serviceB overrides the Class level `@Retry` annotation. Ensure that serviceB is executed more than the maxRetries of 2 specified at the Class level.