Repository navigation
[release/10.0] Fix FileSystemWatcher multi-move test event ordering - #137688
Merged
lewing merged 1 commit intoNov 17, 2026
Merged
Conversation
Backport the applicable test-only changes from dotnet#137557. Preserve strict event ordering on Windows/Linux and compare multisets on macOS/MacCatalyst. Retain the release branch event filters and unrelated platform skips; omit unavailable OpenBSD support and already-absent skip removals. (cherry picked from commit b7bc828) Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-io |
steveisok
approved these changes
Nov 16, 2026
lewing
enabled auto-merge (squash)
November 16, 2026 21:20
Member
Author
|
/ba-g release branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes Issue
Test-only backport for the event-ordering failures tracked by #127651 and #137556.
main PR
#137557
Description
Adapt the test-only portions of b7bc828 to
release/10.0.The four multi-file/directory move assertions use a shared
AssertEventsEqualhelper. On macOS and MacCatalyst, it compares events as a multiset, preserving event identity, total counts, and duplicate counts. Windows and Linux retain strict ordering.This branch has no
PlatformDetection.IsOpenBSD, and the source PR's platform skips to remove are already absent. Those portions are omitted. Existing unrelated platform skips and event filtering are preserved, and no main-only deduplication infrastructure is imported.All changes are confined to the four test/test-utility files. No product code or public API changes.
Customer Impact
No direct customer impact. This reduces intermittent FileSystemWatcher CI failures caused by macOS delivering events for different paths out of order.
Regression
No product regression. The tests incorrectly assumed cross-path event ordering on macOS.
Testing
On macOS arm64:
./build.sh clr+libs -rc releaseon localmainat a56ab6e before applying the backport: passed, with 18 existing dependency-vulnerability warnings and no errors. This was not arelease/10.0baseline build../dotnet.sh build src/libraries/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj -f net10.0-osx /p:UseLocalTargetingRuntimePack=false: passed, no warnings or errors../dotnet.sh build src/tasks/installer.tasks/installer.tasks.csproj: passed, no warnings or errors; supplies the branch's test-runner generation task../dotnet.sh build src/libraries/System.IO.FileSystem.Watcher/tests/System.IO.FileSystem.Watcher.Tests.csproj /t:Test -f net10.0-osx /p:UseLocalTargetingRuntimePack=false "/p:NetCoreAppCurrentTestHostPath=$PWD/.dotnet/" "/p:XUnitOptions=-class System.IO.Tests.File_Move_Tests -class System.IO.Tests.Directory_Move_Tests": passed against the official .NET 10.0.15 runtime bundled with SDK 10.0.115, not the locally built main runtime. XML results confirm 27 passed, 0 failed, 0 skipped, including all 12 applicable multi-move cases.git diff --check: passed.The initial SDK extraction hit a disk-space error; after removing this session's disposable baseline build intermediates, SDK installation and the targeted build succeeded. The first test invocation lacked the branch's runner-generation task; building
installer.tasksresolved it.No full
release/10.0product build, full FileSystemWatcher suite, Windows/Linux/MacCatalyst execution, or PR CI run was performed. Event reordering is intermittent, so a passing local run alone does not establish that the flake is eliminated.Risk
Low risk: test-only changes, with no shipped product or API changes. Only the four multi-move assertions change. On platforms that reorder events, comparison still rejects missing, extra, or different events, including differing duplicate counts. Strict ordering remains on Windows/Linux, and existing platform skips and filters are unchanged.
Package authoring no longer needed in .NET 9
IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.
Note
This PR description was generated with GitHub Copilot.