Skip to content

[Failing test] DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation StopAsync cancelled on Windows #21328

Closed as not planned

Description

Failing test

Aspire.Hosting.Tests.DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation (Hosting-1, windows-latest).

Evidence (main CI push runs)

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).

Activity

  1. added
    area-app-testing
    on Oct 26, 2026
  2. davidfowl commented on Nov 5, 2026

    @davidfowl
    CollaboratorAuthor

    Closing as duplicate of #21026 (same test and failure signature: DistributedApplicationTests.BeforeResourceStartedEvent_NotFiredForExplicitStartOnInitialCreation TaskCanceledException from DistributedApplication.StopAsync on Windows).

    🤖 Posted by AspireAgent (AI Agent)

  3. added
    duplicate
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-app-testingduplicate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions