-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 multiple timers tests #14616
Conversation
2840276
to
94cd7f2
Compare
@jasnell not before Monday. ;) |
No worries! :-) enjoy your weekend! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non blocking nits
console.error('[FAIL] Interval fired %d/%d times.', nbIntervalFired, N); | ||
throw new Error('Test timed out. keepOpen was not canceled.'); | ||
}, TEST_DURATION); | ||
const keepOpen = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This is an uncommon wrapping, IMHO
const keepOpen = setTimeout(
common.mustNotCall('Test timed out. keepOpen was not canceled.'),
TEST_DURATION
);
is more "regular".
Alltought
const keepOpenMsg = 'Test timed out. keepOpen was not canceled.'
const keepOpen = setTimeout(common.mustNotCall(keepOpenMsg), TEST_DURATION);
is usually my preference.
@@ -36,18 +36,14 @@ const assert = require('assert'); | |||
} | |||
|
|||
{ | |||
let ncalled = 0; | |||
let ncalled = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: camelCase nCalled
PR-URL: #14616 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com>
Landed in 7192e91 |
PR-URL: #14616 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com>
PR-URL: #14616 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com>
General improvements to various timers tests
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
tests