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 -
Method Summary
Modifier and TypeMethodDescriptionstatic org.jboss.shrinkwrap.api.spec.WebArchive
deploy()
void
A test to ensure that the CircuitBreaker does not open in response to a BulkheadException iffailOn
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 BulkheadExceptionvoid
A test to ensure that the CircuitBreaker is checked before entering the Bulkhead and that BulkheadExceptions count as failures for the CircuitBreaker.void
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
-
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, TimeoutExceptionA 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 interruptedTimeoutException
- if waiting for a result takes too longExecutionException
- if an async method throws an unexpected exception
-
testCircuitBreakerAroundBulkheadSync
public void testCircuitBreakerAroundBulkheadSync() throws InterruptedException, ExecutionException, TimeoutExceptionA 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 interruptedTimeoutException
- if waiting for a result takes too longExecutionException
- if an async method throws an unexpected exception
-
testCircuitBreaker
A test to ensure that the CircuitBreaker does not open in response to a BulkheadException iffailOn
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 interruptedTimeoutException
- if waiting for a result takes too longExecutionException
- if an async method throws an unexpected exception
-