Skip to content

Stabilize configuration polling reload tests - #131876

Open
svick wants to merge 2 commits into
dotnet:mainfrom
svick:fix-131805
Open

Stabilize configuration polling reload tests#131876
svick wants to merge 2 commits into
dotnet:mainfrom
svick:fix-131805

Conversation

@svick

@svick svick commented Aug 5, 2026

Copy link
Copy Markdown
Member

Fixes #131805.

Description

PollingFileChangeToken detects overwrites through LastWriteTimeUtc. On platforms that use active polling, rapid test writes can retain the previous timestamp and the change is never observed.

This change:

Note

This pull request description was drafted with GitHub Copilot.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aeb5f2a3-ce48-4327-a355-0960afe29610
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 stabilizes Microsoft.Extensions.Configuration functional reload-on-change tests on platforms that rely on polling-based file change detection, by ensuring overwrite operations reliably advance LastWriteTimeUtc so PollingFileChangeToken can observe changes.

Changes:

  • Added a polling-aware helper (WriteFilesForReload) that delays writes when PhysicalFileProvider.UseActivePolling is in effect and asserts timestamps actually changed.
  • Updated overwrite-based reload tests to use the helper to avoid same-timestamp overwrites.
  • Removed remaining ActiveIssue suppressions that referenced #42036 in this test file.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-extensions-filesystem
See info in area-owners.md if you want to be subscribed.

@tarekgh tarekgh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copilot AI review requested due to automatic review settings August 6, 2026 15:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

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

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@svick

svick commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

/ba-g Remaining failure is unrelated (it's #122522)

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.

Microsoft.Extensions.Configuration.Test.ConfigurationTests.ReloadOnChangeWorksAfterError failing in CI

3 participants