From f3736672c33114c9654eda2517358e1b6e273daf Mon Sep 17 00:00:00 2001 From: Colin Aygalinc Date: Thu, 28 Nov 2024 22:14:04 +0100 Subject: [PATCH 1/2] * Bump regular System.Text.RegularExpressions due to detected cve * Increment the nuget cache version to invalidate the cache * Add `Directory.Packages.props` to GHA NuGet cache --- .github/workflows/build-test.yaml | 8 ++++---- projects/Directory.Packages.props | 6 ++---- projects/Test/Common/Common.csproj | 1 + projects/Test/Integration/Integration.csproj | 1 + projects/Test/OAuth2/OAuth2.csproj | 1 + .../SequentialIntegration/SequentialIntegration.csproj | 1 + projects/Test/Unit/Unit.csproj | 1 + 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml index e6d1eb194..9d5814e3b 100644 --- a/.github/workflows/build-test.yaml +++ b/.github/workflows/build-test.yaml @@ -20,9 +20,9 @@ jobs: path: | ~/.nuget/packages ~/AppData/Local/NuGet/v3-cache - key: ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }} + key: ${{ runner.os }}-v2-nuget-${{ hashFiles('**/*.csproj','projects/Directory.Packages.props') }} restore-keys: | - ${{ runner.os }}-v1-nuget- + ${{ runner.os }}-v2-nuget- - name: Build (Debug) run: dotnet build ${{ github.workspace }}\Build.csproj - name: Verify @@ -142,9 +142,9 @@ jobs: path: | ~/.nuget/packages ~/.local/share/NuGet/v3-cache - key: ${{ runner.os }}-v1-nuget-${{ hashFiles('**/*.csproj') }} + key: ${{ runner.os }}-v2-nuget-${{ hashFiles('**/*.csproj','projects/Directory.Packages.props') }} restore-keys: | - ${{ runner.os }}-v1-nuget- + ${{ runner.os }}-v2-nuget- - name: Build (Debug) run: dotnet build ${{ github.workspace }}/Build.csproj - name: Verify diff --git a/projects/Directory.Packages.props b/projects/Directory.Packages.props index 2a5f3a6ce..22f9950be 100644 --- a/projects/Directory.Packages.props +++ b/projects/Directory.Packages.props @@ -16,6 +16,8 @@ --> + + @@ -33,13 +35,9 @@ - - - - diff --git a/projects/Test/Common/Common.csproj b/projects/Test/Common/Common.csproj index cc5869cee..55c0f5820 100644 --- a/projects/Test/Common/Common.csproj +++ b/projects/Test/Common/Common.csproj @@ -26,6 +26,7 @@ + diff --git a/projects/Test/Integration/Integration.csproj b/projects/Test/Integration/Integration.csproj index 585302a85..31b69369f 100644 --- a/projects/Test/Integration/Integration.csproj +++ b/projects/Test/Integration/Integration.csproj @@ -39,6 +39,7 @@ --> + diff --git a/projects/Test/OAuth2/OAuth2.csproj b/projects/Test/OAuth2/OAuth2.csproj index 6710e5d21..d32d77c5d 100644 --- a/projects/Test/OAuth2/OAuth2.csproj +++ b/projects/Test/OAuth2/OAuth2.csproj @@ -28,6 +28,7 @@ + diff --git a/projects/Test/SequentialIntegration/SequentialIntegration.csproj b/projects/Test/SequentialIntegration/SequentialIntegration.csproj index dff8ad5fb..d40208239 100644 --- a/projects/Test/SequentialIntegration/SequentialIntegration.csproj +++ b/projects/Test/SequentialIntegration/SequentialIntegration.csproj @@ -38,6 +38,7 @@ + diff --git a/projects/Test/Unit/Unit.csproj b/projects/Test/Unit/Unit.csproj index fc23c107a..c11c778a5 100644 --- a/projects/Test/Unit/Unit.csproj +++ b/projects/Test/Unit/Unit.csproj @@ -24,6 +24,7 @@ + From 0d02c322b39ed14d550b058aeb4c5d7ec045729a Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Fri, 6 Dec 2024 13:10:55 -0800 Subject: [PATCH 2/2] * Set `TestTfmsInParallel` to `false` --- .../Test/Integration/TestExchangeDeclare.cs | 27 +++++++++++++++++-- .../SequentialIntegration.csproj | 1 + 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/projects/Test/Integration/TestExchangeDeclare.cs b/projects/Test/Integration/TestExchangeDeclare.cs index cdaa06745..ecff7b267 100644 --- a/projects/Test/Integration/TestExchangeDeclare.cs +++ b/projects/Test/Integration/TestExchangeDeclare.cs @@ -112,6 +112,7 @@ public async Task TestConcurrentExchangeDeclareAndDelete() var exchangeNames = new ConcurrentBag(); var tasks = new List(); NotSupportedException nse = null; + Exception unexpectedException = null; for (int i = 0; i < 256; i++) { var t = Task.Run(async () => @@ -129,13 +130,24 @@ public async Task TestConcurrentExchangeDeclareAndDelete() { nse = e; } + catch (Exception ex) + { + unexpectedException = ex; + } }); tasks.Add(t); } await Task.WhenAll(tasks); - Assert.Null(nse); + if (nse is not null) + { + Assert.Fail($"got unexpected NotSupportedException: {nse}"); + } + if (unexpectedException is not null) + { + Assert.Fail($"got unexpected Exception: {unexpectedException}"); + } tasks.Clear(); foreach (string exchangeName in exchangeNames) @@ -154,13 +166,24 @@ public async Task TestConcurrentExchangeDeclareAndDelete() { nse = e; } + catch (Exception ex) + { + unexpectedException = ex; + } }); tasks.Add(t); } await Task.WhenAll(tasks); - Assert.Null(nse); + if (nse is not null) + { + Assert.Fail($"got unexpected NotSupportedException: {nse}"); + } + if (unexpectedException is not null) + { + Assert.Fail($"got unexpected Exception: {unexpectedException}"); + } } } } diff --git a/projects/Test/SequentialIntegration/SequentialIntegration.csproj b/projects/Test/SequentialIntegration/SequentialIntegration.csproj index d40208239..7773206c4 100644 --- a/projects/Test/SequentialIntegration/SequentialIntegration.csproj +++ b/projects/Test/SequentialIntegration/SequentialIntegration.csproj @@ -17,6 +17,7 @@ true true 12.0 + false