Skip to content

Conversation

@riberk
Copy link
Contributor

@riberk riberk commented Nov 6, 2025

This PR fixes tests for a PollWatcher.

I think, the test failed due to races between FS and our code.

It might be the behavior described below

  • The test creates a file
  • The test watch the parent
  • The PollWatcher scans the parent and found an initial state of the file
  • The test removes the file
  • The test waits for the file to be removed (by fs calls)
  • The test calls detect_changes
  • The watcher calls read_dir and still find the file in the dir (because the directory info has not been updated yet, probably?)
  • The watcher raises Modify instead of Remove
  • The test fails

I added the two helper methods to wait a directory state - sleep while / until a child exists in a read_dir call results and called them in any suitable situation

closes #731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FreeBSD PollWatcher test error on CI

1 participant