Skip to content

Fix flaky resource monitoring test#7303

Merged
stephentoub merged 1 commit intodotnet:mainfrom
stephentoub:fixflakyresourcemonitoring
Feb 18, 2026
Merged

Fix flaky resource monitoring test#7303
stephentoub merged 1 commit intodotnet:mainfrom
stephentoub:fixflakyresourcemonitoring

Conversation

@stephentoub
Copy link
Member

@stephentoub stephentoub commented Feb 14, 2026

Microsoft Reviewers: Open in CodeFlow

Copilot AI review requested due to automatic review settings February 14, 2026 13:12
@stephentoub stephentoub requested a review from a team as a code owner February 14, 2026 13:12
Copy link
Contributor

Copilot AI left a 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 addresses flakiness in the Windows resource monitoring test suite by making log record timestamps deterministic, stabilizing Verify snapshot output.

Changes:

  • Construct FakeLogger<WindowsContainerSnapshotProvider> with a FakeLogCollector configured to use a FakeTimeProvider for timestamps.
  • Update the Verify baseline snapshot to reflect the now-stable timestamp placeholder output.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
test/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests/Windows/WindowsContainerSnapshotProviderTests.cs Ensures deterministic log timestamps by configuring the underlying fake log collector with a fake time provider.
test/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests/Windows/Verified/WindowsContainerSnapshotProviderTests.SnapshotProvider_EmitsLogRecord.DotNet.verified.txt Updates the verified snapshot to match the stabilized timestamp output.

@stephentoub stephentoub enabled auto-merge (squash) February 14, 2026 15:16
@stephentoub stephentoub merged commit 53c6baf into dotnet:main Feb 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants