microsoft / microsoft/aspire

[CI Failure] Flaky: TestingBuilderTests.CrashTests fails intermittently with unhandled InvalidOperationException

Open
#18,690 1 comment 0 reactions 0 assignees View on GitHub
ci-failure-cause test-failure
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Build Information

Build: https://github.com/microsoft/aspire/actions/runs/28948977829
Build error leg or test failing: Tests / Run VS Code extension unit tests (Windows) / `Aspire.Hosting.Testing.Tests.TestingBuilderTests.CrashTests(genericEntryPoint: True, crashArg: "after-build")`
Pull request: #18688

## Error Message

```
System.InvalidOperationException : Crashing: after-build.
at Program.$(String[] args) in /_/tests/TestingAppHost1/TestingAppHost1.AppHost/Program.cs:line 56
at Aspire.Hosting.Testing.DistributedApplicationFactory.ResolveApplicationAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting.Testing/DistributedApplicationFactory.cs:line 60
at Aspire.Hosting.Testing.DistributedApplicationTestingBuilder.SuspendingDistributedApplicationFactory.BuildAsync(CancellationToken cancellationToken) in /_/src/Aspire.Hosting.Testing/DistributedApplicationTestingBuilder.cs:line 214
```

## Description

Flaky: TestingBuilderTests.CrashTests fails intermittently with unhandled InvalidOperationException

**Type**: flaky-test

## Occurrences

| Date | Build | Job | PR |
|------|-------|-----|----|
| 2026-07-08 | [28948977829](https://github.com/microsoft/aspire/actions/runs/28948977829) | Tests / Run VS Code extension unit tests (Windows) | #18688 |

Contributor guide

Open the contributing guide

Research direction

Start with Aspire.Hosting.Testing.Tests.TestingBuilderTests.CrashTests for the genericEntryPoint: True, crashArg: "after-build" case, then inspect the stack-trace locations in tests/TestingAppHost1/TestingAppHost1.AppHost/Program.cs and src/Aspire.Hosting.Testing/DistributedApplicationFactory.cs. Re-run the Windows VS Code extension unit-test job or the named test to reproduce the intermittent failure. Done means the case no longer fails intermittently and the test still verifies the expected crash behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, github-actions
Domain
ci-cd, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.