Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure: Microsoft.Extensions.Hosting.Internal.HostTests.HostLifetimeOnStartedCanBeCancelled #110988

Open
v-wenyuxu opened this issue Dec 30, 2024 · 2 comments

Comments

@v-wenyuxu
Copy link

Failed in: runtime-coreclr libraries-pgo 20241228.1

Failed tests:

net10.0-windows-Release-x64-fullpgo_methodprofiling-Windows.10.Amd64.Open
    - Microsoft.Extensions.Hosting.Internal.HostTests.HostLifetimeOnStartedCanBeCancelled

Error message:

 Assert.True() Failure
Expected: True
Actual:   False

Stack trace:

   at Microsoft.Extensions.Hosting.Internal.HostTests.HostLifetimeOnStartedCanBeCancelled() in /_/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs:line 488
--- End of stack trace from previous location ---
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Dec 30, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-extensions-hosting
See info in area-owners.md if you want to be subscribed.

@steveharter
Copy link
Member

Test code hasn't changed since it was added 6 years ago: https://github.com/dotnet/runtime/blame/9e28706dbc252e27174dce1a3b8f69c8ecc912b7/src/libraries/Microsoft.Extensions.Hosting/tests/UnitTests/Internal/HostTests.cs#L488

It is waiting for 5 seconds until lifetimeStart is signaled.

Assert.True(lifetimeStart.WaitOne(TimeSpan.FromSeconds(5)));

However that is done on a Task via Task.Run(() => host.StartAsync()); so that may not always be reliable.

Will wait to see if there are any other hits.

Possible PGO issue?

@steveharter steveharter added this to the 10.0.0 milestone Dec 30, 2024
@steveharter steveharter removed the untriaged New issue has not been triaged by the area owner label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants