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

# Class BulkheadSynchRetryTest

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

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

public class BulkheadSynchRetryTest extends org.jboss.arquillian.testng.Arquillian
This collection of tests tests that failures, particularly Synchronous Bulkhead related failures will cause the Retry annotation logic to work correctly.

Author:
  Gordon Hutchison, Andrew Rouse

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

## Method Summary

Modifier and Type
Method
Description
`static org.jboss.shrinkwrap.api.spec.WebArchive`
`deploy()`
This is the Arquillian deploy method that controls the contents of the war that contains all the tests.
`void`
`testNoRetriesWithAbortOn()`
Test that retries do not occur when BulkheadException is included in the abortOn attribute
`void`
`testNoRetriesWithMaxRetriesZero()`
Test that with maxRetries = 0, bulkhead exceptions are not retried
`void`
`testNoRetriesWithoutRetryOn()`
Test that retries do not occur when BulkheadException is not included in the retryOn attribute
`void`
`testRetryBulkheadExceptionClass()`
Test that Bulkhead exceptions are retried with annotations on class
`void`
`testRetryBulkheadExceptionMethod()`
Test that Bulkhead exceptions are retried with annotations on method
`void`
`testRetryTestExceptionClass()`
Test Bulkhead + Retry when the method throws a business exception with annotations on class
`void`
`testRetryTestExceptionMethod()`
Test Bulkhead + Retry when the method throws a business exception with annotations on method

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

### BulkheadSynchRetryTest

public BulkheadSynchRetryTest()

## Method Details

### deploy

@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy()
This is the Arquillian deploy method that controls the contents of the war that contains all the tests.

Returns:
  the test war "ftBulkheadSynchRetryTest.war"

### testRetryBulkheadExceptionMethod

public void testRetryBulkheadExceptionMethod() throws InterruptedException
Test that Bulkhead exceptions are retried with annotations on method

Throws:
  `InterruptedException`

### testRetryBulkheadExceptionClass

public void testRetryBulkheadExceptionClass() throws InterruptedException
Test that Bulkhead exceptions are retried with annotations on class

Throws:
  `InterruptedException`

### testRetryTestExceptionClass

public void testRetryTestExceptionClass() throws InterruptedException
Test Bulkhead + Retry when the method throws a business exception with annotations on class

Test that:

- the execution is retried
- when the execution is retried, it doesn't hold onto its bulkhead slot

This second point is particularly important if Retry is used with a long delay.

Throws:
  `InterruptedException` - if the test is interrupted

### testRetryTestExceptionMethod

public void testRetryTestExceptionMethod() throws InterruptedException
Test Bulkhead + Retry when the method throws a business exception with annotations on method

Test that:

- the execution is retried
- when the execution is retried, it doesn't hold onto its bulkhead slot

This second point is particularly important if Retry is used with a long delay.

Throws:
  `InterruptedException` - if the test is interrupted

### testNoRetriesWithoutRetryOn

public void testNoRetriesWithoutRetryOn()
Test that retries do not occur when BulkheadException is not included in the retryOn attribute

### testNoRetriesWithAbortOn

public void testNoRetriesWithAbortOn()
Test that retries do not occur when BulkheadException is included in the abortOn attribute

### testNoRetriesWithMaxRetriesZero

public void testNoRetriesWithMaxRetriesZero()
Test that with maxRetries = 0, bulkhead exceptions are not retried