23 references to Hedging
Microsoft.Extensions.Http.Resilience (5)
Hedging\Internals\Validators\HttpStandardHedgingResilienceOptionsCustomValidator.cs (3)
34if (options.Hedging.DelayGenerator == null) 36var maxHedgingDelay = TimeSpan.FromMilliseconds(options.Hedging.MaxHedgedAttempts * options.Hedging.Delay.TotalMilliseconds);
Hedging\ResilienceHttpClientBuilderExtensions.Hedging.cs (2)
84options.Hedging.ActionGenerator = args => 125.AddHedging(options.Hedging);
Microsoft.Extensions.Http.Resilience.Tests (18)
Hedging\HttpStandardHedgingResilienceOptionsCustomValidatorTests.cs (4)
57options.Hedging.MaxHedgedAttempts = 1; 58options.Hedging.Delay = options.TotalRequestTimeout.Timeout; 62options.Hedging.Delay = TimeSpan.FromDays(1); 63options.Hedging.DelayGenerator = _ => new ValueTask<TimeSpan>(TimeSpan.FromDays(1));
Hedging\HttpStandardHedgingResilienceOptionsTests.cs (1)
26_options.Hedging.Name.Should().Be("StandardHedging-Hedging");
Hedging\StandardHedgingTests.cs (13)
39options.Hedging.MaxHedgedAttempts = DefaultHedgingAttempts; 40options.Hedging.Delay = TimeSpan.FromMilliseconds(5); 47Builder.Configure(options => options.Hedging.MaxHedgedAttempts = -1); 63Builder.Configure(o => o.Hedging.MaxHedgedAttempts = 8); 68Assert.Equal(8, options.Hedging.MaxHedgedAttempts); 77o.Hedging.MaxHedgedAttempts = 8; 83Assert.Equal(8, options.Hedging.MaxHedgedAttempts); 105Assert.Equal(8, options.Hedging.MaxHedgedAttempts); 113var generator = options.Hedging.ActionGenerator; 248Builder.Configure(config).Configure(options => options.Hedging.Delay = Timeout.InfiniteTimeSpan); 327opt.Hedging.MaxHedgedAttempts = 10; 328opt.Hedging.Delay = TimeSpan.FromSeconds(11); 348protected override void ConfigureHedgingOptions(Action<HttpHedgingStrategyOptions> configure) => Builder.Configure(options => configure(options.Hedging));