Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flakey watch deletion test for FSEvents #891

Merged
merged 2 commits into from May 20, 2022

Conversation

samschott
Copy link
Contributor

@samschott samschott commented May 20, 2022

Fixes the occasional failures of tests/test_fsevents.py::test_watcher_deletion_while_receiving_events_2.

The test would fail not because of error messages in the captured log output (what it's aiming to test) but rather due to DEBUG messages in the log output despite the log level being set to ERROR. This is because file system events are logged at DEBUG and may enter the log after exiting the caplog context from the previous run and before entering the context in the next run.

This PR fixes this by staying in the caplog context with level ERROR throughout the test.

@samschott samschott marked this pull request as ready for review May 20, 2022 20:54
@BoboTiG BoboTiG merged commit 5e5cb4a into gorakhargosh:master May 20, 2022
@BoboTiG
Copy link
Collaborator

BoboTiG commented May 20, 2022

Thanks @samschott 🍾

@samschott
Copy link
Contributor Author

That was quick! I hope this actually fixes it, it was the best reason I could find for the failure 🤞

@samschott samschott deleted the flakey-watch-deletion-test branch May 20, 2022 21:08
@BoboTiG
Copy link
Collaborator

BoboTiG commented May 20, 2022

It cannot be worse, and the new code is still simple to follow, so 👍 :)

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.

None yet

2 participants