7 references to IsTransient
Microsoft.Extensions.Http.Resilience (1)
Hedging\HttpClientHedgingResiliencePredicates.cs (1)
42
||
IsTransient
(outcome);
Microsoft.Extensions.Http.Resilience.Tests (6)
Hedging\HttpClientHedgingResiliencePredicatesTests.cs (6)
29
Assert.True(HttpClientHedgingResiliencePredicates.
IsTransient
(Outcome.FromException<HttpResponseMessage>(new TimeoutRejectedException())));
30
Assert.True(HttpClientHedgingResiliencePredicates.
IsTransient
(Outcome.FromException<HttpResponseMessage>(new BrokenCircuitException())));
31
Assert.True(HttpClientHedgingResiliencePredicates.
IsTransient
(Outcome.FromException<HttpResponseMessage>(new HttpRequestException())));
32
Assert.False(HttpClientHedgingResiliencePredicates.
IsTransient
(Outcome.FromException<HttpResponseMessage>(new InvalidOperationException())));
33
Assert.False(HttpClientHedgingResiliencePredicates.
IsTransient
(Outcome.FromResult<HttpResponseMessage>(null)));
43
HttpClientHedgingResiliencePredicates.
IsTransient
(Outcome.FromResult(response)).Should().Be(expected);