-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: improve assertions in pummel/test-timers #35216
Conversation
This fixes the flakiness of the test on macOS in CI. master branch, 71 failures in 200 runs: https://ci.nodejs.org/job/node-stress-single-test/175/ this PR, 0 failures in 200 runs: https://ci.nodejs.org/job/node-stress-single-test/176/ @nodejs/testing |
@nodejs/timers |
@nodejs/collaborators This could use reviews. |
As far as I know windows timers sometimes fire slightly earlier. At least I faced issues with flaky timer tests in an earlier project because of this. I did a fast test and at least for a 16 and a 30ms timeout I saw that callback was called 0.x ms earlier then expected. |
Firing less than 1ms early based on |
* Timers should not fire early. Check for that. * Allow the wiggle-room to increase on subsequent iterations of intervals. PR-URL: nodejs#35216 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Landed in 87c433e |
* Timers should not fire early. Check for that. * Allow the wiggle-room to increase on subsequent iterations of intervals. PR-URL: #35216 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
* Timers should not fire early. Check for that. * Allow the wiggle-room to increase on subsequent iterations of intervals. PR-URL: #35216 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
* Timers should not fire early. Check for that. * Allow the wiggle-room to increase on subsequent iterations of intervals. PR-URL: nodejs#35216 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
intervals.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes