dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.45k stars 10.03k forks source link

Quarantine ServerComparison.FunctionalTests.HelloWorldTests.ApplicationException #42380

Open BrennanConroy opened 2 years ago

BrennanConroy commented 2 years ago

Failing Test(s)

Error Message

Xunit.Sdk.ContainsException: Assert.Contains() Failure
Not found: /throwexception - - - 500

Stacktrace

```text at Xunit.Assert.Contains(String expectedSubstring, String actualString, StringComparison comparisonType) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\StringAsserts.cs:line 35 at Xunit.Assert.Contains(String expectedSubstring, String actualString) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\StringAsserts.cs:line 22 at ServerComparison.FunctionalTests.HelloWorldTests.ApplicationException(TestVariant variant) in /_/src/Servers/test/FunctionalTests/HelloWorldTest.cs:line 161 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<b__1>d.MoveNext() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 264 --- End of stack trace from previous location --- at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 48 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 90 ```

Logs

```text [0.002s] [TestLifetime] [Information] Starting test ApplicationException-Server_Kestrel,_TFM_net7.0,_Type_Portable,_Arch_x64 at 2022-06-23T17:39:48 [2.349s] [ServerComparison.FunctionalTests.HelloWorldTests] [Error] Test threw an exception. Xunit.Sdk.ContainsException: Assert.Contains() Failure Not found: /throwexception - - - 500 In value: Hosting environment: Production Content root path: /Users/runner/work/1/s/src/Servers/testassets/ServerComparison.TestSites Now listening on: http://127.0.0.1:51853 Application started. Press Ctrl+C to shut down. info: Microsoft.AspNetCore.Hosting.Diagnostics[1] Request starting HTTP/1.1 GET http://127.0.0.1:51853/throwexception - - fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HMIL7TFOI10V", Request id "0HMIL7TFOI10V:00000001": An unhandled exception was thrown by the application. System.ApplicationException: Application exception at ServerComparison.TestSites.Startup.<>c.b__0_2(HttpContext context) in /Users/runner/work/1/s/src/Servers/testassets/ServerComparison.TestSites/Startup.cs:line 19 at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath) in /_/src/Http/Http.Abstractions/src/Extensions/MapMiddleware.cs:line 76 at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application) in /_/src/Servers/Kestrel/Core/src/Internal/Http/HttpProtocol.cs:line 671 Application is shutting down... at Xunit.Assert.Contains(String expectedSubstring, String actualString, StringComparison comparisonType) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\StringAsserts.cs:line 35 at Xunit.Assert.Contains(String expectedSubstring, String actualString) in C:\Dev\xunit\xunit\src\xunit.assert\Asserts\StringAsserts.cs:line 22 at ServerComparison.FunctionalTests.HelloWorldTests.ApplicationException(TestVariant variant) in /_/src/Servers/test/FunctionalTests/HelloWorldTest.cs:line 161 at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<b__1>d.MoveNext() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 264 --- End of stack trace from previous location --- at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 48 at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 90 [2.350s] [TestLifetime] [Information] Finished test ApplicationException-Server_Kestrel,_TFM_net7.0,_Type_Portable,_Arch_x64 in 2.3482017s ```

Build

https://dev.azure.com/dnceng/public/_build/results?buildId=1840701&view=ms.vss-test-web.build-test-results-tab&runId=48603386&resultId=100025

amcasey commented 11 months ago

Related to #45378?