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

# Class CircuitBreakerBulkheadTest

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

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

public class CircuitBreakerBulkheadTest extends org.jboss.arquillian.testng.Arquillian

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

## Method Summary

Modifier and Type
Method
Description
`static org.jboss.shrinkwrap.api.spec.WebArchive`
`deploy()`
`void`
`testCircuitBreaker()`
A test to ensure that the CircuitBreaker does not open in response to a BulkheadException if `failOn` does not include BulkheadException Uses an asynchronous bulkhead With requestVolumeThreshold = 3, failureRatio = 1.0, delay = 50000, failOn=TestException the expected behaviour is, Execution Behaviour ========= ========= 1 Fill Bulkhead 2 Fill Bulkhead 3 BulkheadException 4 BulkheadException 5 BulkheadException 6 BulkheadException 7 BulkheadException
`void`
`testCircuitBreakerAroundBulkheadAsync()`
A test to ensure that the CircuitBreaker is checked before entering the Bulkhead and that BulkheadExceptions count as failures for the CircuitBreaker.
`void`
`testCircuitBreakerAroundBulkheadSync()`
A test to ensure that the CircuitBreaker is checked before entering the Bulkhead and that BulkheadExceptions count as failures for the CircuitBreaker.

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

### CircuitBreakerBulkheadTest

public CircuitBreakerBulkheadTest()

## Method Details

### deploy

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

### testCircuitBreakerAroundBulkheadAsync

public void testCircuitBreakerAroundBulkheadAsync() throws InterruptedException, ExecutionException, TimeoutException
A test to ensure that the CircuitBreaker is checked before entering the Bulkhead and that BulkheadExceptions count as failures for the CircuitBreaker. Uses an asynchronous bulkhead With requestVolumeThreshold = 3, failureRatio = 1.0, delay = 50000 the expected behaviour is, Execution Behaviour ========= ========= 1 Fill Bulkhead 2 Fill Bulkhead 3 BulkheadException 4 BulkheadException 5 BulkheadException 6 CircuitBreakerOpenException 7 CircuitBreakerOpenException

Throws:
  `InterruptedException` - if the test is interrupted
  `TimeoutException` - if waiting for a result takes too long
  `ExecutionException` - if an async method throws an unexpected exception

### testCircuitBreakerAroundBulkheadSync

public void testCircuitBreakerAroundBulkheadSync() throws InterruptedException, ExecutionException, TimeoutException
A test to ensure that the CircuitBreaker is checked before entering the Bulkhead and that BulkheadExceptions count as failures for the CircuitBreaker. Uses a synchronous bulkhead With requestVolumeThreshold = 3, failureRatio = 1.0, delay = 50000 the expected behaviour is, Execution Behaviour ========= ========= 1 Fill Bulkhead 2 BulkheadException 3 BulkheadException 4 BulkheadException 5 CircuitBreakerOpenException 6 CircuitBreakerOpenException

Throws:
  `InterruptedException` - if the test is interrupted
  `TimeoutException` - if waiting for a result takes too long
  `ExecutionException` - if an async method throws an unexpected exception

### testCircuitBreaker

public void testCircuitBreaker() throws InterruptedException, ExecutionException, TimeoutException
A test to ensure that the CircuitBreaker does not open in response to a BulkheadException if `failOn` does not include BulkheadException Uses an asynchronous bulkhead With requestVolumeThreshold = 3, failureRatio = 1.0, delay = 50000, failOn=TestException the expected behaviour is, Execution Behaviour ========= ========= 1 Fill Bulkhead 2 Fill Bulkhead 3 BulkheadException 4 BulkheadException 5 BulkheadException 6 BulkheadException 7 BulkheadException

Throws:
  `InterruptedException` - if the test is interrupted
  `TimeoutException` - if waiting for a result takes too long
  `ExecutionException` - if an async method throws an unexpected exception