Repository navigation
factory tests: an idle pull is held to the bound of the watch it got - #2164
Merged
Merged
Conversation
TestAnIdlePullDoesNotRereadAnUnchangedFloor failed on busy machines with 'read the unchanged floor 12 times'. Cause: fsnotify.NewWatcher fails when the user's inotify instances (128 by default, shared by every process of the user) are spent, so the handler has no filesystem watch and the pull keeps its designed timed look, every 100 ms: 2 + 10 reads in one second. Exhausting inotify in the test process reproduces exactly 12. The test now asks whether the handler watches its root. With a watch it keeps the bound of 3; without one it checks the timed look's own bound, one look per tick, which load cannot raise because a ticker drops ticks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What changes
TestAnIdlePullDoesNotRereadAnUnchangedFloor(added in #2122) failed on busy machines with "an idle one-second pull read the unchanged floor 12 times". When run alone, it passed.The cause is not CPU timing. The factory follows its root with a filesystem watch, and opening one needs an inotify instance. Every process of the user draws from one shared pool, 128 by default. On a busy test machine the pool runs out, so the handler gets no watch. The pull then keeps its designed timed look every 100 ms: 2 reads plus 10 ticks gives exactly 12.
The test now asks the handler whether it watches its root:
An internal test hook,
WatchesItsRoot, reports which mode the handler is in.Evidence
TestAnOpenPullTakesAJobQueuedDuringItsWaitpass 5 runs out of 5.Limits
🤖 Generated with Claude Code