Class CircuitBreakerConfigBean
java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.config.CircuitBreakerConfigBean
Suite of methods for testing the various parameters of CircuitBreaker
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
delayMethod
(boolean fail) This method's circuit breaker moves from open to half-open after 10 micros, unless delay and delayUnit are configured differently.void
Method throws TestConfigExceptionA which will NOT result in CircuitBreakerOpenException on the third call, unless failOn is configured to TestConfigExceptionA.void
failureRatioMethod
(boolean fail) This method's circuit breaker moves from closed to open after 10 consecutive failures, unless failureRatio is configured differently.void
Method throws TestConfigExceptionA which will result in CircuitBreakerOpenException on the third call, unless requestVolumeThreshold is configured to a greater number.void
Method throws TestConfigExceptionA which will result in CircuitBreakerOpenException on the third call, unless skipOn is configured to TestConfigExceptionA.void
successThresholdMethod
(boolean fail) This method's circuit breaker moves from half-open to closed after 4 consecutive successes, unless successThreshold is configured differently.
-
Constructor Details
-
CircuitBreakerConfigBean
public CircuitBreakerConfigBean()
-
-
Method Details
-
failOnMethod
@CircuitBreaker(requestVolumeThreshold=2, failOn=TestConfigExceptionB.class) public void failOnMethod()Method throws TestConfigExceptionA which will NOT result in CircuitBreakerOpenException on the third call, unless failOn is configured to TestConfigExceptionA. -
skipOnMethod
Method throws TestConfigExceptionA which will result in CircuitBreakerOpenException on the third call, unless skipOn is configured to TestConfigExceptionA. -
delayMethod
@CircuitBreaker(requestVolumeThreshold=2, delay=20L, delayUnit=MICROS) public void delayMethod(boolean fail) This method's circuit breaker moves from open to half-open after 10 micros, unless delay and delayUnit are configured differently. -
requestVolumeThresholdMethod
Method throws TestConfigExceptionA which will result in CircuitBreakerOpenException on the third call, unless requestVolumeThreshold is configured to a greater number. -
failureRatioMethod
@CircuitBreaker(requestVolumeThreshold=10, failureRatio=1.0) public void failureRatioMethod(boolean fail) This method's circuit breaker moves from closed to open after 10 consecutive failures, unless failureRatio is configured differently. -
successThresholdMethod
@CircuitBreaker(requestVolumeThreshold=10, successThreshold=4, delay=1000L) public void successThresholdMethod(boolean fail) This method's circuit breaker moves from half-open to closed after 4 consecutive successes, unless successThreshold is configured differently.
-