Search in sources :

Example 1 with CircuitBreakerTimeoutException

use of com.nike.fastbreak.exception.CircuitBreakerTimeoutException in project riposte by Nike-Inc.

the class BackstopperRiposteFrameworkErrorHandlerListenerTest method should_handle_CircuitBreakerException.

@Test
public void should_handle_CircuitBreakerException() {
    verifyExceptionHandled(new CircuitBreakerOpenException("foo", "bar"), singletonError(listener.CIRCUIT_BREAKER_OPEN_API_ERROR));
    verifyExceptionHandled(new CircuitBreakerTimeoutException("foo", "bar"), singletonError(listener.CIRCUIT_BREAKER_TIMEOUT_API_ERROR));
    verifyExceptionHandled(new CircuitBreakerException("foo", "bar") {
    }, singletonError(listener.CIRCUIT_BREAKER_GENERIC_API_ERROR));
}
Also used : CircuitBreakerException(com.nike.fastbreak.exception.CircuitBreakerException) CircuitBreakerTimeoutException(com.nike.fastbreak.exception.CircuitBreakerTimeoutException) CircuitBreakerOpenException(com.nike.fastbreak.exception.CircuitBreakerOpenException) Test(org.junit.Test)

Aggregations

CircuitBreakerException (com.nike.fastbreak.exception.CircuitBreakerException)1 CircuitBreakerOpenException (com.nike.fastbreak.exception.CircuitBreakerOpenException)1 CircuitBreakerTimeoutException (com.nike.fastbreak.exception.CircuitBreakerTimeoutException)1 Test (org.junit.Test)1