Repository navigation
test(watch): remove filesystem timing assumptions - #388
Merged
Merged
Conversation
Write loops and individual truncate/write operations can span multiple 200 ms quiet windows, making a fixed notification count invalid. Keep exact batching assertions on queued raw events and check change delivery in filesystem integration tests. The fd-budget test can also observe a signal before the asynchronous FSEvents handover finishes. Wait for the exact descriptor count with a bounded deadline instead of treating channel silence as completion. Production watcher logic and timing parameters are unchanged.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What this changes
Make the
tw-watchandtw-configfilesystem tests verify change delivery without assuming a fixed notification count. Keep exact batching assertions in the queued raw-event test. The macOS fd-budget test now waits for the exact descriptor count during backend handover, with a five-second deadline.Why
Writes and notification delivery can span several 200 ms quiet windows when I/O or scheduling stalls. Multiple notifications are then correct, so a write loop or a single truncate/write operation cannot require exactly one signal.
A change notification can also arrive before FSEvents finishes starting and the old descriptors are released. A quiet notification channel does not establish that the backend handover has completed.
How it was verified
Notes for review
All changes are confined to test code and comments. Production watcher code and timing parameters are unchanged. Exact batching and descriptor-count assertions remain active.