Commit 0b17ed5
Fix flaky
macOS FSEvents can deliver duplicate `Deleted` events when moving
files/directories from a watched to an unwatched directory. The existing
`isFilteredOut` filter (Mac path, `skipOldEvents=true`) only discarded
stale `Created`/`Changed` events—not duplicate `Deleted` events—causing
`ExpectEvents` to signal completion prematurely and collect an extra
event:
```
Expected: [Deleted file0, Deleted file1]
Actual: [Deleted file0, Deleted file0, Deleted file1]
```
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jtschuster <36744439+jtschuster@users.noreply.github.com>File_Move_Multiple_From_Watched_To_Unwatched_Mac test caused by duplicate FSEvents (#125779)1 parent 7ef9c00 commit 0b17ed5
3 files changed
Lines changed: 19 additions & 2 deletions
File tree
- src/libraries/System.IO.FileSystem.Watcher/tests
- Utility
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
229 | 232 | | |
230 | 233 | | |
231 | 234 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
505 | 506 | | |
506 | 507 | | |
507 | 508 | | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
508 | 519 | | |
509 | 520 | | |
510 | 521 | | |
| |||
0 commit comments