dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.91k stars 475 forks source link

Fix flaky ResourceHealthCheckService test. #6730

Closed mitchdenny closed 8 hours ago

mitchdenny commented 3 days ago

Description

Introduce a time provider into the ResourceHealthCheckService so we can tighten up the timing for a test case. There isn't necessarily a problem with the shipping code, but this should help address test reliability (or make it easier to reason over future failures).

I was not able to repro this test failure with or without this change.

Fixes #6363

Microsoft Reviewers: Open in CodeFlow