Repository navigation
test: deflake test-util-throttle - #67982
Open
christianaurichzm wants to merge 1 commit into
Open
christianaurichzm wants to merge 1 commit into
christianaurichzm wants to merge 1 commit into
Conversation
The abort listener check expects the second call to a throttle with a 10 ms window to be queued. If the process is descheduled for 10 ms between the two calls, the window has already expired and the second one runs right away without adding the listener. Move the check to test-util-throttle-timing.js, where the timers and the libuv clock are mocked. Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67982 +/- ##
==========================================
+ Coverage 90.56% 90.58% +0.01%
==========================================
Files 802 802
Lines 286935 286935
Branches 55415 55410 -5
==========================================
+ Hits 259871 259916 +45
+ Misses 17161 17100 -61
- Partials 9903 9919 +16 🚀 New features to boost your workflow:
|
jasnell
approved these changes
Dec 3, 2026
panva
approved these changes
Dec 3, 2026
Collaborator
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.
parallel/test-util-throttlefails at line 274 with0 !== 1on 2 PRs in the latest reliability report.The block from #66839 expects the second call to a 10 ms throttle to be queued. Each call updates the libuv clock, so if the process is descheduled for 10 ms between them, the second call runs immediately, without the abort listener. The block now lives in
test-util-throttle-timing.js, where #66034 put the other timing checks.With a 20 ms
Atomics.wait()between the calls, it fails 10/10 before this change and 0/10 after.Refs: nodejs/reliability#1742