You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Failing test] DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation StopAsync cancelled on Windows #21328
https://github.com/microsoft/aspire/actions/runs/40386459442: TaskCanceledException from Host.StopAsync via DistributedApplication.StopAsync (DistributedApplication.cs:497), thrown at tests/Aspire.Hosting.Tests/DistributedApplicationTests.cs:365 (await app.StopAsync(token).DefaultTimeout(...)). Test took 30s.
All assertions before StopAsync passed; only teardown stalls.
Classification
Intermittent: it fails on some main runs and passes on others.
Suspected cause (unconfirmed)
The test fires app.StartAsync(token) without awaiting it, then calls StopAsync(token) with the same token that is bound to the default-timeout CTS, so a slow Windows stop is reported as cancellation. A candidate improvement is to observe the start task and give shutdown its own token, but it was not attempted: the automation sandbox cannot restore NuGet packages, so no fix could be built or validated.
Status
No PR yet; not quarantined (no proven infrastructure cause, no failed fix attempts).
Closing as duplicate of #21026 (same test and failure signature: DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation TaskCanceledException from DistributedApplication.StopAsync on Windows).
Activity
MihuBot commentedon Oct 26, 2026
I'm a bot. Here is a possible related and/or duplicate issue (I may be wrong):
Add explicit-start shutdown regression coverage (startup-token cancel…
davidfowl commentedon Nov 5, 2026
Closing as duplicate of #21026 (same test and failure signature: DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation TaskCanceledException from DistributedApplication.StopAsync on Windows).
🤖 Posted by AspireAgent (AI Agent)