public class AmazonHttpClientRetryPolicyTest extends RetryPolicyTestBase
AmazonHttpClient#executeHelper()
method passes the correct
context information into the configured RetryPolicy.RetryPolicyTestBase.ContextDataCollectionBackoffStrategy, RetryPolicyTestBase.ContextDataCollectionRetryCondition, RetryPolicyTestBase.MockHttpClient, RetryPolicyTestBase.ReturnServiceErrorHttpClient, RetryPolicyTestBase.TestAmazonWebServiceRequest, RetryPolicyTestBase.TestHttpResponseHandler, RetryPolicyTestBase.ThrowingExceptionHttpClient
backoffStrategy, clientConfiguration, errorResponseHandler, originalRequest, retryCondition
Constructor and Description |
---|
AmazonHttpClientRetryPolicyTest() |
Modifier and Type | Method and Description |
---|---|
void |
resetContextData()
Reset the RetryPolicy and restart collecting context data
|
void |
testIOExceptioinHandling()
Tests AmazonHttpClient's behavior upon simulated IOException during
executing the http request when the request payload is repeatable.
|
void |
testIOExceptionHandlingWithNonRepeatableRequestContent()
Tests AmazonHttpClient's behavior upon simulated IOException when the
request payload is not repeatable.
|
void |
testServiceExceptionHandling()
Tests AmazonHttpClient's behavior upon simulated service exceptions when the
request payload is repeatable.
|
void |
testServiceExceptionHandlingWithNonRepeatableRequestContent()
Tests AmazonHttpClient's behavior upon simulated service exceptions when the
request payload is not repeatable.
|
void |
testUnexpectedFailureHandling()
Tests AmazonHttpClient's behavior upon simulated RuntimeException (which
should be handled as an unexpected failure and not retried).
|
getSampleRequestWithNonRepeatableContent, getSampleRequestWithRepeatableContent, injectMockHttpClient, verifyExpectedContextData
public void resetContextData()
public void testServiceExceptionHandling()
public void testIOExceptioinHandling()
public void testServiceExceptionHandlingWithNonRepeatableRequestContent()
public void testIOExceptionHandlingWithNonRepeatableRequestContent()
public void testUnexpectedFailureHandling()
Copyright © 2018. All rights reserved.