From ded1c15f2531f6e3dee5aa9dc2346eaac15f812e Mon Sep 17 00:00:00 2001 From: Mikhail Kumachev Date: Tue, 10 Nov 2020 20:42:41 +0300 Subject: [PATCH 1/4] chore: Add net5 as a target and update dependencies. --- .../Dodo.HttpClient.ResiliencePolicies.Tests.csproj | 10 +++++----- .../Dodo.HttpClient.ResiliencePolicies.csproj | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Dodo.HttpClient.ResiliencePolicies.Tests.csproj b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Dodo.HttpClient.ResiliencePolicies.Tests.csproj index 46df163..d92e670 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Dodo.HttpClient.ResiliencePolicies.Tests.csproj +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Dodo.HttpClient.ResiliencePolicies.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;netcoreapp3.1 + netcoreapp2.1;netcoreapp3.1;net5.0 netcoreapp2.1 8.0 false @@ -9,11 +9,11 @@ - - + + - - + + diff --git a/src/Dodo.HttpClient.ResiliencePolicies/Dodo.HttpClient.ResiliencePolicies.csproj b/src/Dodo.HttpClient.ResiliencePolicies/Dodo.HttpClient.ResiliencePolicies.csproj index 42c89e9..c9bb4f1 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies/Dodo.HttpClient.ResiliencePolicies.csproj +++ b/src/Dodo.HttpClient.ResiliencePolicies/Dodo.HttpClient.ResiliencePolicies.csproj @@ -1,6 +1,6 @@ - netstandard2.0;netcoreapp3.1 + netstandard2.0;netcoreapp3.1;net5 netstandard2.0 8.0 2.0.0 @@ -8,11 +8,11 @@ Dodo.HttpClient.ResiliencePolicies - - - - - + + + + + From 6a946fdc3b1a043cc26f16161f679637162a8454 Mon Sep 17 00:00:00 2001 From: Mikhail Kumachev Date: Tue, 10 Nov 2020 20:51:17 +0300 Subject: [PATCH 2/4] chore: Add net5 to CI build --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f7da9fb..0f4c455 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,9 @@ jobs: strategy: matrix: dotnet: [ - { framework: netcoreapp2.1, version: 2.1.806 }, - { framework: netcoreapp3.1, version: 3.1.202 } + { framework: netcoreapp2.1, version: 2.1.x }, + { framework: netcoreapp3.1, version: 3.1.x }, + { framework: net5, version: 5.0.x }, ] name: ${{ matrix.dotnet.framework }} – run tests From d247ebe3bedef784d61d2ee17ed9f3c38b8ac369 Mon Sep 17 00:00:00 2001 From: Mikhail Kumachev Date: Tue, 10 Nov 2020 20:58:06 +0300 Subject: [PATCH 3/4] chore: Add net5 to other builds --- .github/workflows/master.yml | 5 +++-- .github/workflows/release.yml | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f6ff6c3..37d02c7 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,8 +12,9 @@ jobs: strategy: matrix: dotnet: [ - { framework: netcoreapp2.1, version: 2.1.806 }, - { framework: netcoreapp3.1, version: 3.1.202 } + { framework: netcoreapp2.1, version: 2.1.x }, + { framework: netcoreapp3.1, version: 3.1.x }, + { framework: net5, version: 5.0.x }, ] name: ${{ matrix.dotnet.framework }} – run tests diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6243624..e2830b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,9 @@ jobs: strategy: matrix: dotnet: [ - { framework: netcoreapp2.1, version: 2.1.806 }, - { framework: netcoreapp3.1, version: 3.1.202 } + { framework: netcoreapp2.1, version: 2.1.x }, + { framework: netcoreapp3.1, version: 3.1.x }, + { framework: net5, version: 5.0.x }, ] name: ${{ matrix.dotnet.framework }} – run tests @@ -62,7 +63,7 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.202 + dotnet-version: 5.0.x - name: Build and publish library to NuGet run: | From 6a17157a45d3529ec015fefba8e8463b2e6b62e7 Mon Sep 17 00:00:00 2001 From: Mikhail Kumachev Date: Tue, 10 Nov 2020 21:47:16 +0300 Subject: [PATCH 4/4] fix: Dispose HttpRequestMessage --- src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs index 6d2e34f..0970551 100644 --- a/src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs +++ b/src/Dodo.HttpClient.ResiliencePolicies.Tests/Helper.cs @@ -12,7 +12,7 @@ public static async Task InvokeMultipleHttpRequests(HttpClient client, int taskC var tasks = new Task[taskCount]; for (var i = 0; i < taskCount; i++) { - var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); + using var requestMessage = new HttpRequestMessage(HttpMethod.Get, uri); requestMessage.Headers.Add("TaskId", i.ToString()); tasks[i] = client.SendAsync(requestMessage); }