Skip to content

Commit 236e817

Browse files
dscpinheironormj
authored andcommitted
fix: Typo in adaptive retry policy
1 parent d6f4364 commit 236e817

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sdk/src/Core/Amazon.Runtime/Pipeline/RetryHandler/AdaptiveRetryPolicy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ public override void ObtainSendToken(IExecutionContext executionContext, Excepti
8080

8181
if (executionContext.RequestContext.ClientConfig.FastFailRequests)
8282
{
83-
throw new AmazonClientException($"{whyFail}. The client is configured to fail fast and there is insufficent capacity to attempt the request.", exception);
83+
throw new AmazonClientException($"{whyFail}. The client is configured to fail fast and there is insufficient capacity to attempt the request.", exception);
8484
}
8585

8686
//Else we were unable to obtain capacity after looping.
87-
throw new AmazonClientException($"{whyFail}. There is insufficent capacity to attempt the request after attempting to obtain capacity multiple times.", exception);
87+
throw new AmazonClientException($"{whyFail}. There is insufficient capacity to attempt the request after attempting to obtain capacity multiple times.", exception);
8888
}
8989
}
9090

sdk/src/Core/Amazon.Runtime/Pipeline/RetryHandler/_async/AdaptiveRetryPolicy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ public override async Task ObtainSendTokenAsync(IExecutionContext executionConte
6363

6464
if (executionContext.RequestContext.ClientConfig.FastFailRequests)
6565
{
66-
throw new AmazonClientException($"{whyFail}. The client is configured to fail fast and there is insufficent capacity to attempt the request.", exception);
66+
throw new AmazonClientException($"{whyFail}. The client is configured to fail fast and there is insufficient capacity to attempt the request.", exception);
6767
}
6868

6969
//Else we were unable to obtain capacity after looping.
70-
throw new AmazonClientException($"{whyFail}. There is insufficent capacity to attempt the request after attempting to obtain capacity multiple times.", exception);
70+
throw new AmazonClientException($"{whyFail}. There is insufficient capacity to attempt the request after attempting to obtain capacity multiple times.", exception);
7171
}
7272
}
7373
}

sdk/test/UnitTests/Custom/Runtime/RetryHandlerAdaptiveModeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ public void VerifyClientRateLimitingFastFailRequestWithNoTokenBucketCapacity()
298298
RuntimePipeline.InvokeSync(executionContext);
299299
});
300300

301-
Assert.AreEqual("While attempting to retry a request error capacity could not be obtained. The client is configured to fail fast and there is insufficent capacity to attempt the request.", exception.Message);
301+
Assert.AreEqual("While attempting to retry a request error capacity could not be obtained. The client is configured to fail fast and there is insufficient capacity to attempt the request.", exception.Message);
302302

303303
var capacity = MockAdaptiveRetryPolicy.CurrentCapacityManagerInstance.GetRetryCapacity(config.ServiceURL);
304304
Assert.AreEqual(1, executionContext.RequestContext.Retries);
@@ -338,7 +338,7 @@ public void VerifyClientRateLimitingNoHangMultipleAttemptsNoTokenBucketCapacity(
338338
RuntimePipeline.InvokeSync(executionContext);
339339
});
340340

341-
Assert.AreEqual("While attempting to retry a request error capacity could not be obtained. There is insufficent capacity to attempt the request after attempting to obtain capacity multiple times.", exception.Message);
341+
Assert.AreEqual("While attempting to retry a request error capacity could not be obtained. There is insufficient capacity to attempt the request after attempting to obtain capacity multiple times.", exception.Message);
342342

343343
var capacity = MockAdaptiveRetryPolicy.CurrentCapacityManagerInstance.GetRetryCapacity(config.ServiceURL);
344344
Assert.AreEqual(1, executionContext.RequestContext.Retries);

0 commit comments

Comments
 (0)