public class CircuitBreakerBulkheadTest
extends org.jboss.arquillian.testng.Arquillian
Constructor and Description |
---|
CircuitBreakerBulkheadTest() |
Modifier and Type | Method and 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.
|
@Deployment public static org.jboss.shrinkwrap.api.spec.WebArchive deploy()
public void testCircuitBreakerAroundBulkheadAsync() throws InterruptedException, ExecutionException, TimeoutException
InterruptedException
- if the test is interruptedTimeoutException
- if waiting for a result takes too longExecutionException
- if an async method throws an unexpected exceptionpublic void testCircuitBreakerAroundBulkheadSync() throws InterruptedException, ExecutionException, TimeoutException
InterruptedException
- if the test is interruptedTimeoutException
- if waiting for a result takes too longExecutionException
- if an async method throws an unexpected exceptionpublic void testCircuitBreaker() throws InterruptedException, ExecutionException, TimeoutException
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 BulkheadExceptionInterruptedException
- if the test is interruptedTimeoutException
- if waiting for a result takes too longExecutionException
- if an async method throws an unexpected exceptionCopyright © 2020 Eclipse Foundation. All rights reserved.