-
Notifications
You must be signed in to change notification settings - Fork 763
Improve flaky dashboard integration test #12534
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
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12534Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12534" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the LogOutput_LocalhostAddress_LocalhostInLogOutput test to improve reliability and add MCP endpoint logging verification. The test previously had issues with port allocation retries due to shared state between test sink instances.
- Modified test to reuse a single
TestSinkinstance across retries instead of recreating it, preventing log pollution from previous failed attempts - Added MCP endpoint configuration and verification to the test
- Improved port collision detection in
ServerRetryHelperwith better random spacing and duplicate detection
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/Aspire.Dashboard.Tests/Integration/StartupTests.cs | Enhanced test to verify MCP endpoint logging, fixed TestSink reuse issue, and added OTLP HTTP port configuration |
| tests/Aspire.Dashboard.Tests/Integration/ServerRetryHelper.cs | Added duplicate port detection and improved random port spacing |
| src/Aspire.Dashboard/DashboardWebApplication.cs | Added MCP endpoint logging to startup output |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
c746109 to
7375feb
Compare
|
/backport to release/13.0 |
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18962795178 |
Description
I think some dashboard tests have been flaky because the next random port logic doesn't provide a min random number. A random increase of 0 could be used which would generate unexpected test results.
Checklist
<remarks />and<code />elements on your triple slash comments?doc-ideatemplatebreaking-changetemplatediagnostictemplate