Package com.guinetik.rr.interceptor
Class InterceptorTest
- java.lang.Object
-
- com.guinetik.rr.interceptor.InterceptorTest
-
public class InterceptorTest extends Object
Tests for the interceptor infrastructure including RequestInterceptor, InterceptingClient, and RetryInterceptor.
-
-
Constructor Summary
Constructors Constructor Description InterceptorTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUp()voidtestGetInterceptorsReturnsUnmodifiableList()voidtestInterceptingClientAcceptsNullInterceptors()voidtestInterceptingClientRejectsNullDelegate()voidtestInterceptorCanRecoverFromError()voidtestInterceptorDefaultMethods()voidtestInterceptorDefaultOnErrorRethrows()voidtestInterceptorModifiesRequest()voidtestInterceptorModifiesResponse()voidtestInterceptorOrderingAfterResponse()voidtestInterceptorOrderingBeforeRequest()voidtestMaxRetriesExceeded()voidtestNoRetryOn4xxClientError()voidtestNoRetryOnCircuitBreakerOpen()voidtestRetryInterceptorBuilder()voidtestRetryInterceptorRejectsLowMultiplier()voidtestRetryInterceptorRejectsNegativeDelay()voidtestRetryInterceptorRejectsNegativeRetries()voidtestRetryOn408RequestTimeout()voidtestRetryOn429TooManyRequests()voidtestRetryOnConnectionError()voidtestRetryOnServerError()
-
-
-
Method Detail
-
setUp
public void setUp()
-
testInterceptorDefaultMethods
public void testInterceptorDefaultMethods()
-
testInterceptorDefaultOnErrorRethrows
public void testInterceptorDefaultOnErrorRethrows() throws RocketRestException- Throws:
RocketRestException
-
testInterceptorOrderingBeforeRequest
public void testInterceptorOrderingBeforeRequest()
-
testInterceptorOrderingAfterResponse
public void testInterceptorOrderingAfterResponse()
-
testInterceptorModifiesRequest
public void testInterceptorModifiesRequest()
-
testInterceptorModifiesResponse
public void testInterceptorModifiesResponse()
-
testInterceptingClientRejectsNullDelegate
public void testInterceptingClientRejectsNullDelegate()
-
testInterceptingClientAcceptsNullInterceptors
public void testInterceptingClientAcceptsNullInterceptors()
-
testGetInterceptorsReturnsUnmodifiableList
public void testGetInterceptorsReturnsUnmodifiableList()
-
testRetryOnServerError
public void testRetryOnServerError()
-
testRetryOnConnectionError
public void testRetryOnConnectionError()
-
testNoRetryOn4xxClientError
public void testNoRetryOn4xxClientError()
-
testNoRetryOnCircuitBreakerOpen
public void testNoRetryOnCircuitBreakerOpen()
-
testMaxRetriesExceeded
public void testMaxRetriesExceeded()
-
testRetryOn429TooManyRequests
public void testRetryOn429TooManyRequests()
-
testRetryOn408RequestTimeout
public void testRetryOn408RequestTimeout()
-
testRetryInterceptorBuilder
public void testRetryInterceptorBuilder()
-
testRetryInterceptorRejectsNegativeRetries
public void testRetryInterceptorRejectsNegativeRetries()
-
testRetryInterceptorRejectsNegativeDelay
public void testRetryInterceptorRejectsNegativeDelay()
-
testRetryInterceptorRejectsLowMultiplier
public void testRetryInterceptorRejectsLowMultiplier()
-
testInterceptorCanRecoverFromError
public void testInterceptorCanRecoverFromError()
-
-