From 80abb8ddf7a2454930ae2378b121f044fe3df848 Mon Sep 17 00:00:00 2001
From: martintmk <103487740+martintmk@users.noreply.github.com>
Date: Mon, 5 Feb 2024 22:04:52 +0100
Subject: [PATCH] Upgrade Polly to version 8.3.0 (#4922)
---
eng/packages/General.props | 8 ++++----
eng/packages/TestOnly.props | 2 +-
.../HttpClientBuilderExtensionsTests.Resilience.cs | 8 +++++++-
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/eng/packages/General.props b/eng/packages/General.props
index 8a3633a72db..1ee694e5356 100644
--- a/eng/packages/General.props
+++ b/eng/packages/General.props
@@ -37,10 +37,10 @@
-
-
-
-
+
+
+
+
diff --git a/eng/packages/TestOnly.props b/eng/packages/TestOnly.props
index c04980b381d..d94f4b78586 100644
--- a/eng/packages/TestOnly.props
+++ b/eng/packages/TestOnly.props
@@ -8,7 +8,7 @@
-
+
diff --git a/test/Libraries/Microsoft.Extensions.Http.Resilience.Tests/Resilience/HttpClientBuilderExtensionsTests.Resilience.cs b/test/Libraries/Microsoft.Extensions.Http.Resilience.Tests/Resilience/HttpClientBuilderExtensionsTests.Resilience.cs
index 66baa44fd57..49e74bcca10 100644
--- a/test/Libraries/Microsoft.Extensions.Http.Resilience.Tests/Resilience/HttpClientBuilderExtensionsTests.Resilience.cs
+++ b/test/Libraries/Microsoft.Extensions.Http.Resilience.Tests/Resilience/HttpClientBuilderExtensionsTests.Resilience.cs
@@ -92,7 +92,13 @@ public void AddResilienceHandler_EnsureServicesNotAddedTwice()
// add twice intentionally
builder.AddResilienceHandler("test", ConfigureBuilder);
- builder.Services.Should().HaveCount(count + 2);
+ // We check that the count of existing services is not unnecessary increased.
+ //
+ // The additional 3 services that are registered are related to:
+ // - Configuration of HTTP client options
+ // - Configuration of resilience pipeline
+ // - Registration of keyed service for resilience pipeline
+ builder.Services.Should().HaveCount(count + 3);
}
[Fact]