File tree Expand file tree Collapse file tree 8 files changed +37
-10
lines changed Expand file tree Collapse file tree 8 files changed +37
-10
lines changed Original file line number Diff line number Diff line change 2020 path : |
2121 ~/.nuget/packages
2222 ~/AppData/Local/NuGet/v3-cache
23- key : ${{ runner.os }}-v1 -nuget-${{ hashFiles('**/*.csproj') }}
23+ key : ${{ runner.os }}-v2 -nuget-${{ hashFiles('**/*.csproj','projects/Directory.Packages.props ') }}
2424 restore-keys : |
25- ${{ runner.os }}-v1 -nuget-
25+ ${{ runner.os }}-v2 -nuget-
2626 - name : Build (Debug)
2727 run : dotnet build ${{ github.workspace }}\Build.csproj
2828 - name : Verify
@@ -142,9 +142,9 @@ jobs:
142142 path : |
143143 ~/.nuget/packages
144144 ~/.local/share/NuGet/v3-cache
145- key : ${{ runner.os }}-v1 -nuget-${{ hashFiles('**/*.csproj') }}
145+ key : ${{ runner.os }}-v2 -nuget-${{ hashFiles('**/*.csproj','projects/Directory.Packages.props ') }}
146146 restore-keys : |
147- ${{ runner.os }}-v1 -nuget-
147+ ${{ runner.os }}-v2 -nuget-
148148 - name : Build (Debug)
149149 run : dotnet build ${{ github.workspace }}/Build.csproj
150150 - name : Verify
Original file line number Diff line number Diff line change 1616 -->
1717 <PackageVersion Include =" System.IO.Pipelines" Version =" 8.0.0" />
1818 <PackageVersion Include =" System.Net.Http" Version =" 4.3.4" />
19+ <PackageVersion Include =" System.Text.Json" Version =" 8.0.5" />
20+ <PackageVersion Include =" System.Text.RegularExpressions" Version =" 4.3.1" />
1921 <PackageVersion Include =" System.Threading.RateLimiting" Version =" 8.0.0" />
2022 <PackageVersion Include =" WireMock.Net" Version =" 1.5.62" />
2123 <PackageVersion Include =" xunit" Version =" 2.9.0" />
3335 <PackageVersion Include =" System.Diagnostics.DiagnosticSource" Version =" 8.0.1" />
3436 <PackageVersion Include =" System.Memory" Version =" 4.5.5" />
3537 <PackageVersion Include =" System.Threading.Channels" Version =" 8.0.0" />
36- <PackageVersion Include =" System.Text.Json" Version =" 8.0.5" />
3738 <PackageVersion Include =" System.Net.Http.Json" Version =" 8.0.1" />
3839 <PackageVersion Include =" Microsoft.Bcl.AsyncInterfaces" Version =" 8.0.0" />
3940 </ItemGroup >
40- <ItemGroup Condition =" $(TargetFramework)=='net472'" >
41- <PackageVersion Include =" System.Text.Json" Version =" 8.0.5" />
42- </ItemGroup >
4341 <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework'" >
4442 <GlobalPackageReference Include =" Microsoft.NETFramework.ReferenceAssemblies" Version =" 1.0.3" />
4543 </ItemGroup >
Original file line number Diff line number Diff line change 2626 </ItemGroup >
2727
2828 <ItemGroup >
29+ <PackageReference Include =" System.Text.Json" />
2930 <PackageReference Include =" EasyNetQ.Management.Client" />
3031 <PackageReference Include =" xunit" />
3132 <PackageReference Include =" xunit.abstractions" />
Original file line number Diff line number Diff line change 3939 -->
4040
4141 <ItemGroup >
42+ <PackageReference Include =" System.Text.Json" />
4243 <PackageReference Include =" Microsoft.NET.Test.Sdk" />
4344 <PackageReference Include =" xunit" />
4445 <PackageReference Include =" xunit.runner.visualstudio" PrivateAssets =" all" />
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ public async Task TestConcurrentExchangeDeclareAndDelete()
112112 var exchangeNames = new ConcurrentBag < string > ( ) ;
113113 var tasks = new List < Task > ( ) ;
114114 NotSupportedException nse = null ;
115+ Exception unexpectedException = null ;
115116 for ( int i = 0 ; i < 256 ; i ++ )
116117 {
117118 var t = Task . Run ( async ( ) =>
@@ -129,13 +130,24 @@ public async Task TestConcurrentExchangeDeclareAndDelete()
129130 {
130131 nse = e ;
131132 }
133+ catch ( Exception ex )
134+ {
135+ unexpectedException = ex ;
136+ }
132137 } ) ;
133138 tasks . Add ( t ) ;
134139 }
135140
136141 await Task . WhenAll ( tasks ) ;
137142
138- Assert . Null ( nse ) ;
143+ if ( nse is not null )
144+ {
145+ Assert . Fail ( $ "got unexpected NotSupportedException: { nse } ") ;
146+ }
147+ if ( unexpectedException is not null )
148+ {
149+ Assert . Fail ( $ "got unexpected Exception: { unexpectedException } ") ;
150+ }
139151 tasks . Clear ( ) ;
140152
141153 foreach ( string exchangeName in exchangeNames )
@@ -154,13 +166,24 @@ public async Task TestConcurrentExchangeDeclareAndDelete()
154166 {
155167 nse = e ;
156168 }
169+ catch ( Exception ex )
170+ {
171+ unexpectedException = ex ;
172+ }
157173 } ) ;
158174 tasks . Add ( t ) ;
159175 }
160176
161177 await Task . WhenAll ( tasks ) ;
162178
163- Assert . Null ( nse ) ;
179+ if ( nse is not null )
180+ {
181+ Assert . Fail ( $ "got unexpected NotSupportedException: { nse } ") ;
182+ }
183+ if ( unexpectedException is not null )
184+ {
185+ Assert . Fail ( $ "got unexpected Exception: { unexpectedException } ") ;
186+ }
164187 }
165188 }
166189}
Original file line number Diff line number Diff line change 2828
2929 <ItemGroup >
3030 <PackageReference Include =" Microsoft.NET.Test.Sdk" />
31+ <PackageReference Include =" System.Text.RegularExpressions" />
3132 <PackageReference Include =" xunit" />
3233 <PackageReference Include =" xunit.runner.visualstudio" PrivateAssets =" all" />
3334 <PackageReference Include =" System.Net.Http" />
Original file line number Diff line number Diff line change 1717 <SignAssembly >true</SignAssembly >
1818 <IsTestProject >true</IsTestProject >
1919 <LangVersion >12.0</LangVersion >
20+ <TestTfmsInParallel >false</TestTfmsInParallel >
2021 </PropertyGroup >
2122
2223 <ItemGroup >
3839 </ItemGroup >
3940
4041 <ItemGroup >
42+ <PackageReference Include =" System.Text.Json" />
4143 <PackageReference Include =" Microsoft.NET.Test.Sdk" />
4244 <PackageReference Include =" OpenTelemetry.Exporter.InMemory" />
4345 <PackageReference Include =" xunit" />
Original file line number Diff line number Diff line change 2424 </ItemGroup >
2525
2626 <ItemGroup >
27+ <PackageReference Include =" System.Text.Json" />
2728 <PackageReference Include =" Microsoft.NET.Test.Sdk" />
2829 <PackageReference Include =" xunit" />
2930 <PackageReference Include =" xunit.runner.visualstudio" PrivateAssets =" all" />
You can’t perform that action at this time.
0 commit comments