AWSSDK_DotNet.IntegrationTests.Tests.S3.CapacityManagerTests.FailureRetryRequests C# (CSharp) Method

FailureRetryRequests() private static method

private static FailureRetryRequests ( int totalRequests, int retryRequests, int extraRequests, AmazonS3Client client ) : void
totalRequests int
retryRequests int
extraRequests int
client Amazon.S3.AmazonS3Client
return void
        private static void FailureRetryRequests(int totalRequests, int retryRequests, int extraRequests, AmazonS3Client client)
        {
            for (int i = 0; i < totalRequests; i++)
            {
                try
                {
                    var response = client.ListObjects("CapacityManagerTests");
                }
                catch (Exception)
                {
                    if (i == totalRequests - 1)
                    {
                        Assert.AreEqual(retryRequests * 2, requestCount - extraRequests);
                    }
                    continue;
                }
            }
        }
    }