diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 33cbc8cbd8e..1fc2ecd3bed 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,6 +10,9 @@ updates: - package-ecosystem: nuget directory: "/" groups: + polly: + patterns: + - Polly* xunit: patterns: - xunit* diff --git a/Directory.Build.props b/Directory.Build.props index 8fa466d35af..b9da96c4e8f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,5 +1,6 @@ + true true diff --git a/Directory.Packages.props b/Directory.Packages.props index 8505f80d338..9bfaa6cf565 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,12 +1,4 @@ - - true - 8.6.2 - 8.0.0 - - - 9.0.0 - @@ -17,29 +9,25 @@ - - - - - - - - - - + + + + + + - + - - - - + + + + @@ -47,12 +35,27 @@ - - + + + + + + + + + + + + + + + + + diff --git a/samples/Chaos/Chaos.csproj b/samples/Chaos/Chaos.csproj index 135449de97e..e56f9d3b33b 100644 --- a/samples/Chaos/Chaos.csproj +++ b/samples/Chaos/Chaos.csproj @@ -2,8 +2,6 @@ net9.0 - enable - enable Chaos diff --git a/samples/DependencyInjection/DependencyInjection.csproj b/samples/DependencyInjection/DependencyInjection.csproj index f73ecdbafb0..4c52a3cd20d 100644 --- a/samples/DependencyInjection/DependencyInjection.csproj +++ b/samples/DependencyInjection/DependencyInjection.csproj @@ -3,13 +3,11 @@ Exe net9.0 - enable - enable - + diff --git a/samples/Directory.Build.props b/samples/Directory.Build.props index 65ffeb1be98..5ffa04e7612 100644 --- a/samples/Directory.Build.props +++ b/samples/Directory.Build.props @@ -1,14 +1,17 @@ - true - true - true latest - Library + false + true + enable false + true $(NoWarn);SA1123;SA1515;CA2000;CA2007;CA1303;IDE0021;RS0037;RS0016;CS1591 - false + enable + Library + true + true diff --git a/samples/Extensibility/Extensibility.csproj b/samples/Extensibility/Extensibility.csproj index 49e230a9337..051a66db64e 100644 --- a/samples/Extensibility/Extensibility.csproj +++ b/samples/Extensibility/Extensibility.csproj @@ -3,8 +3,6 @@ Exe net9.0 - enable - enable diff --git a/samples/GenericPipelines/GenericPipelines.csproj b/samples/GenericPipelines/GenericPipelines.csproj index caa321690bb..023769f2e30 100644 --- a/samples/GenericPipelines/GenericPipelines.csproj +++ b/samples/GenericPipelines/GenericPipelines.csproj @@ -3,8 +3,6 @@ Exe net9.0 - enable - enable diff --git a/samples/Intro.FSharp/Intro.FSharp.fsproj b/samples/Intro.FSharp/Intro.FSharp.fsproj index 414975d92eb..89b253d4a00 100644 --- a/samples/Intro.FSharp/Intro.FSharp.fsproj +++ b/samples/Intro.FSharp/Intro.FSharp.fsproj @@ -2,9 +2,7 @@ Exe - net8.0 - enable - enable + net9.0 diff --git a/samples/Intro.FSharp/Program.fs b/samples/Intro.FSharp/Program.fs index f7b7ca02216..666de749bb7 100644 --- a/samples/Intro.FSharp/Program.fs +++ b/samples/Intro.FSharp/Program.fs @@ -18,7 +18,7 @@ let demo () = // and for both void and result-returning user-callbacks. let pipeline = ResiliencePipelineBuilder() - .AddTimeout(TimeSpan.FromSeconds(5)) + .AddTimeout(TimeSpan.FromSeconds(5.0)) .Build() let token = CancellationToken.None diff --git a/samples/Intro.VisualBasic/Intro.VisualBasic.vbproj b/samples/Intro.VisualBasic/Intro.VisualBasic.vbproj index 499481d3d4e..051a66db64e 100644 --- a/samples/Intro.VisualBasic/Intro.VisualBasic.vbproj +++ b/samples/Intro.VisualBasic/Intro.VisualBasic.vbproj @@ -2,9 +2,7 @@ Exe - net8.0 - enable - enable + net9.0 diff --git a/samples/Intro/Intro.csproj b/samples/Intro/Intro.csproj index 49e230a9337..051a66db64e 100644 --- a/samples/Intro/Intro.csproj +++ b/samples/Intro/Intro.csproj @@ -3,8 +3,6 @@ Exe net9.0 - enable - enable diff --git a/samples/Retries/Retries.csproj b/samples/Retries/Retries.csproj index 49e230a9337..051a66db64e 100644 --- a/samples/Retries/Retries.csproj +++ b/samples/Retries/Retries.csproj @@ -3,8 +3,6 @@ Exe net9.0 - enable - enable diff --git a/test/Polly.Core.Tests/Retry/RetryResilienceStrategyTests.cs b/test/Polly.Core.Tests/Retry/RetryResilienceStrategyTests.cs index 7c66704ee13..8cae859abf9 100644 --- a/test/Polly.Core.Tests/Retry/RetryResilienceStrategyTests.cs +++ b/test/Polly.Core.Tests/Retry/RetryResilienceStrategyTests.cs @@ -2,7 +2,6 @@ using Polly.Retry; using Polly.Telemetry; using Polly.Testing; -using Xunit.Sdk; namespace Polly.Core.Tests.Retry; @@ -256,7 +255,7 @@ public async Task RetryDelayGenerator_ZeroDelay_NoTimeProviderCalls() int generatedValues = 0; var delay = TimeSpan.Zero; - var provider = new ThrowingFakeTimeProvider(); + var provider = new FakeTimeProvider(); _options.ShouldHandle = _ => PredicateResult.True(); _options.MaxRetryAttempts = 3; @@ -289,14 +288,6 @@ public void IsLastAttempt_Ok() increment.ShouldBeFalse(); } - private sealed class ThrowingFakeTimeProvider : FakeTimeProvider - { - public override DateTimeOffset GetUtcNow() => throw new XunitException("TimeProvider should not be used."); - - public override ITimer CreateTimer(TimerCallback callback, object? state, TimeSpan dueTime, TimeSpan period) - => throw new XunitException("TimeProvider should not be used."); - } - [Fact] public async Task OnRetry_EnsureCorrectArguments() {