You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Try to have searchRetryCount*retryInterval to be close to 1 second in order to keep the user still engaged. https://www.nngroup.com/articles/website-response-times/
@@ -58,11 +58,15 @@ public static IAsyncPolicy<HttpResponseMessage> SearchClientCircuitBreakerPolicy
58
58
59
59
/// <summary>
60
60
/// A WaitAndRetryForever policy to be used with the SearchClientCircuitBreakerPolicy.
61
-
/// The policy will retry on any transient error and will not retry on <see cref="BrokenCircuitException"/> to avoid non-necessary retries due to circuit breaker exceptions.
61
+
/// The policy will retry for <paramref name="retryCount"/> on any transient error and will not retry on <see cref="BrokenCircuitException"/> to avoid non-necessary retries due to circuit breaker exceptions.
logger.LogInformation("Policy retry - it will retry after {RetryMilliseconds} milliseconds. {Exception} {SearchName}",waitDuration.TotalMilliseconds,delegateResult.Exception,searchName);
logger.LogInformation("Policy retry - it will retry after {RetryMilliseconds} milliseconds. {Exception} {SearchName}",waitDuration.TotalMilliseconds,delegateResult.Exception,searchName);
varretryInfo=_loggerFor_InvalidTestSearchHttpClientRetryCountExpires.Informations.Where(s =>s.StartsWith("Policy retry - it will retry after")).Count();
varcircuitBreakerWarning=_loggerFor_InvalidTestSearchHttpClientRetryCountExpires.Warnings.Where(s =>s.StartsWith("SearchCircuitBreaker logging: Breaking the circuit for")).Count();
185
+
varonCircuitBreakerReset=_loggerFor_InvalidTestSearchHttpClientRetryCountExpires.Informations.Where(s =>s.StartsWith("SearchCircuitBreaker logging: Call ok! Closed the circuit again!")).Count();
186
+
varonCircuitBreakerHalfOpen=_loggerFor_InvalidTestSearchHttpClientRetryCountExpires.Informations.Where(s =>s.StartsWith("SearchCircuitBreaker logging: Half-open: Next call is a trial!")).Count();
services.AddHttpClient<TestSearchHttpClient>(_nameFor_InvalidTestSearchHttpClientWithLongCircuitBreakDelay, c =>c.BaseAddress=newUri(_longInvalidAddress))
services.AddHttpClient<TestSearchHttpClient>(_nameFor_InvalidTestSearchHttpClientWithShortCircuitBreakDelay, c =>c.BaseAddress=newUri(_shortInvalidAddress))
0 commit comments