C# Class AWSSDK_DotNet.IntegrationTests.Tests.S3.CapacityManagerTests

Show file Open project: aws/aws-sdk-net

Public Properties

Property Type Description
requestCount int

Private Methods

Method Description
FailureRetryRequests ( int totalRequests, int retryRequests, int extraRequests, AmazonS3Client client ) : void
S3CapacityManagerIntegrationTest ( ) : void

Background Info:- Each retry request requires 5 capacity. On successful retry response 5 would be put back into the capacity. On a successful response which is not a retry request 1 is added to the capacity. The capacity has a max cap that is not exceeded. Dependency:- This test depends on the file ListObjectsResponse.xml which contains a sample success ListObject response. This Integration test works in three phases. Phase 1. Keeping in mind that we can make a 100 requests with the current set configurations, 500 requests are made to a mock servlet which returns back a 500 error which leads to 500 retry requests. As the capacity can only handle a 100, this leads to the capacity getting depleted. An assert proves the number of retry requests that was made. Phase 2. With the capacity completely entry, phase 2 makes 500 requests for which the mock servlet returns a success response. This puts back enough capacity to make a 100 retry requests. Phase 3. Phase 1 is repeated again with an assert to prove that Phase 2 added the said capacity.

Property Details

requestCount public static property

public static int requestCount
return int