public class RetryPolicyTestBase extends Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
RetryPolicyTestBase.ContextDataCollectionBackoffStrategy  | 
static class  | 
RetryPolicyTestBase.ContextDataCollectionRetryCondition  | 
static class  | 
RetryPolicyTestBase.MockHttpClient
A base abstract class for fake HttpClient implementations 
 | 
static class  | 
RetryPolicyTestBase.ReturnServiceErrorHttpClient
A mock HttpClient implementation that does nothing but directly returns a
 BasicHttpResponse object with the specified status code upon any call on
 execute(...) method. 
 | 
static class  | 
RetryPolicyTestBase.TestAmazonWebServiceRequest  | 
static class  | 
RetryPolicyTestBase.TestHttpResponseHandler
An error response handler implementation that simply
   - keeps the status code
   - sets the error code by the status text (which comes from the reason phrase in the low-level response) 
 | 
static class  | 
RetryPolicyTestBase.ThrowingExceptionHttpClient
A mock HttpClient implementation that does nothing but throws the
 specified IOException or RuntimeException upon any call on execute(...)
 method. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected static RetryPolicyTestBase.ContextDataCollectionBackoffStrategy | 
backoffStrategy  | 
protected static ClientConfiguration | 
clientConfiguration  | 
protected static HttpResponseHandler<AmazonServiceException> | 
errorResponseHandler  | 
protected static AmazonWebServiceRequest | 
originalRequest  | 
protected static RetryPolicyTestBase.ContextDataCollectionRetryCondition | 
retryCondition
The retry condition and back-off strategy implementations that record all
 the context data passed into shouldRetry and calculateSleepTime methods. 
 | 
| Constructor and Description | 
|---|
RetryPolicyTestBase()  | 
| Modifier and Type | Method and Description | 
|---|---|
static Request<?> | 
getSampleRequestWithNonRepeatableContent(AmazonWebServiceRequest amazonWebServiceRequest)  | 
static Request<?> | 
getSampleRequestWithRepeatableContent(AmazonWebServiceRequest amazonWebServiceRequest)  | 
static void | 
injectMockHttpClient(AmazonHttpClient amazonHttpClient,
                    ConnectionManagerAwareHttpClient mockHttpClient)  | 
static void | 
verifyExpectedContextData(com.amazonaws.retry.RetryPolicyTestBase.ContextDataCollection contextDataCollection,
                         AmazonWebServiceRequest failedRequest,
                         AmazonClientException expectedException,
                         int expectedRetries)
Verifies the RetryCondition has collected the expected context information. 
 | 
protected static ClientConfiguration clientConfiguration
protected static final AmazonWebServiceRequest originalRequest
protected static final HttpResponseHandler<AmazonServiceException> errorResponseHandler
protected static RetryPolicyTestBase.ContextDataCollectionRetryCondition retryCondition
protected static RetryPolicyTestBase.ContextDataCollectionBackoffStrategy backoffStrategy
public static void injectMockHttpClient(AmazonHttpClient amazonHttpClient, ConnectionManagerAwareHttpClient mockHttpClient)
public static Request<?> getSampleRequestWithRepeatableContent(AmazonWebServiceRequest amazonWebServiceRequest)
public static Request<?> getSampleRequestWithNonRepeatableContent(AmazonWebServiceRequest amazonWebServiceRequest)
public static void verifyExpectedContextData(com.amazonaws.retry.RetryPolicyTestBase.ContextDataCollection contextDataCollection,
                                             AmazonWebServiceRequest failedRequest,
                                             AmazonClientException expectedException,
                                             int expectedRetries)
Copyright © 2020. All rights reserved.