aspire icon indicating copy to clipboard operation
aspire copied to clipboard

[Failing test]: BuildAndRunStarterTemplateBuiltInTest.BuildAndRunStarterTemplateBuiltInTest_Test

Open danmoseley opened this issue 8 months ago • 3 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

Build information

Build: https://github.com/dotnet/aspire/actions/runs/14328474155/job/40159075488?pr=8621 Build error leg or test failing: Aspire.Templates.Tests.BuildAndRunStarterTemplateBuiltInTest.BuildAndRunStarterTemplateBuiltInTest_Test Pull Request: N/A

Fill in the error message template

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "",
  "ErrorPattern": "GetWebResourceRootReturnsOkStatusCode \\[FAIL\\]",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Other info

No response

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Known issue validation

Build: :mag_right: Result validation: :warning: Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: :mag_right:" line. Validation performed at: 4/9/2025 4:31:44 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0

Known issue validation

Build: :mag_right: Result validation: :warning: Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: :mag_right:" line. Validation performed at: 4/9/2025 4:31:44 PM UTC

danmoseley avatar Apr 08 '25 20:04 danmoseley

BuildAndRunStarterTemplateBuiltInTest.BuildAndRunStarterTemplateBuiltInTest_Test("xunit.net") runs test from the xunit test in the aspire-starter template. And that test is expected to fail but the dotnet test process is expected to return exit code 0.

ToolCommandException :  Expected 0 exit code but got 1: /home/runner/work/aspire/aspire/artifacts/bin/dotnet-tests/dotnet test -c Debug 
Standard Output:
  Determining projects to restore...
  All projects are up-to-date for restore.
  starter test.Debug-xunit_net_rkwvp5qq_jdq.ServiceDefaults -> /tmp/templates-testroot/starter test.Debug-xunit_net_rkwvp5qq_jdq/starter test.Debug-xunit_net_rkwvp5qq_jdq.ServiceDefaults/bin/Debug/net9.0/starter test.Debug-xunit_net_rkwvp5qq_jdq.ServiceDefaults.dll
  starter test.Debug-xunit_net_rkwvp5qq_jdq.ApiService -> /tmp/templates-testroot/starter test.Debug-xunit_net_rkwvp5qq_jdq/starter test.Debug-xunit_net_rkwvp5qq_jdq.ApiService/bin/Debug/net9.0/starter test.Debug-xunit_net_rkwvp5qq_jdq.ApiService.dll
  starter test.Debug-xunit_net_rkwvp5qq_jdq.Web -> /tmp/templates-testroot/starter test.Debug-xunit_net_rkwvp5qq_jdq/starter test.Debug-xunit_net_rkwvp5qq_jdq.Web/bin/Debug/net9.0/starter test.Debug-xunit_net_rkwvp5qq_jdq.Web.dll
  starter test.Debug-xunit_net_rkwvp5qq_jdq.AppHost -> /tmp/templates-testroot/starter test.Debug-xunit_net_rkwvp5qq_jdq/starter test.Debug-xunit_net_rkwvp5qq_jdq.AppHost/bin/Debug/net9.0/starter test.Debug-xunit_net_rkwvp5qq_jdq.AppHost.dll
  starter test.Debug-xunit_net_rkwvp5qq_jdq.Tests -> /tmp/templates-testroot/starter test.Debug-xunit_net_rkwvp5qq_jdq/starter test.Debug-xunit_net_rkwvp5qq_jdq.Tests/bin/Debug/net9.0/starter test.Debug-xunit_net_rkwvp5qq_jdq.Tests.dll
Test run for /tmp/templates-testroot/starter test.Debug-xunit_net_rkwvp5qq_jdq/starter test.Debug-xunit_net_rkwvp5qq_jdq.Tests/bin/Debug/net9.0/starter test.Debug-xunit_net_rkwvp5qq_jdq.Tests.dll (.NETCoreApp,Version=v9.0)
VSTest version 17.12.0 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:21.21]     starter_test.Debug_xunit_net_rkwvp5qq_jdq.Tests.WebTests.GetWebResourceRootReturnsOkStatusCode [FAIL]
  Failed starter_test.Debug_xunit_net_rkwvp5qq_jdq.Tests.WebTests.GetWebResourceRootReturnsOkStatusCode [20 s]
  Error Message:
   Aspire.Hosting.DistributedApplicationException : Stopped waiting for resource 'webfrontend' to become healthy because it failed to start.
  Stack Trace:
     at Aspire.Hosting.ApplicationModel.ResourceNotificationService.WaitForResourceHealthyAsync(String resourceName, WaitBehavior waitBehavior, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs:line 282
   at Aspire.Hosting.ApplicationModel.ResourceNotificationService.WaitForResourceHealthyAsync(String resourceName, CancellationToken cancellationToken) in /_/src/Aspire.Hosting/ApplicationModel/ResourceNotificationService.cs:line 243
   at starter_test.Debug_xunit_net_rkwvp5qq_jdq.Tests.WebTests.GetWebResourceRootReturnsOkStatusCode() in /tmp/templates-testroot/starter test.Debug-xunit_net_rkwvp5qq_jdq/starter test.Debug-xunit_net_rkwvp5qq_jdq.Tests/WebTests.cs:line 34
   at starter_test.Debug_xunit_net_rkwvp5qq_jdq.Tests.WebTests.GetWebResourceRootReturnsOkStatusCode() in /tmp/templates-testroot/starter test.Debug-xunit_net_rkwvp5qq_jdq/starter test.Debug-xunit_net_rkwvp5qq_jdq.Tests/WebTests.cs:line 38
--- End of stack trace from previous location ---

Failed!  - Failed:     1, Passed:     0, Skipped:     0, Total:     1, Duration: 20 s - starter test.Debug-xunit_net_rkwvp5qq_jdq.Tests.dll (net9.0)

radical avatar Apr 08 '25 21:04 radical

And that test is expected to fail but the dotnet test process is expected to return exit code 0.

Hm no, I'm wrong about that. I'll investigate.

radical avatar Apr 08 '25 21:04 radical

TODO:

  • [ ] Collect logs from the xunit test run in the outer templates test

radical avatar Apr 08 '25 22:04 radical