FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: improve multiple timers tests by jasnell · Pull Request #14616 · nodejs/node · GitHub

/ node Public

test: improve multiple timers tests - #14616

Closed
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:improve-timers-tests
Closed

test: improve multiple timers tests#14616
jasnell wants to merge 1 commit into
nodejs:masterfrom
jasnell:improve-timers-tests

Conversation

jasnell commented Aug 4, 2017

Copy link
Copy Markdown
Member

General improvements to various timers tests

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

tests

nodejs-github-bot added the test Issues and PRs related to the tests. label Aug 4, 2017
jasnell force-pushed the improve-timers-tests branch from 2840276 to 94cd7f2 Compare August 4, 2017 01:10
mscdex added the timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. label Aug 4, 2017

jasnell commented Aug 4, 2017

Copy link
Copy Markdown
Member Author

jasnell requested review from Trott and addaleax August 4, 2017 20:36

addaleax commented Aug 4, 2017

Copy link
Copy Markdown
Member

@jasnell not before Monday. ;)

jasnell commented Aug 4, 2017

Copy link
Copy Markdown
Member Author

No worries! :-) enjoy your weekend!

refack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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 =

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.


{
let ncalled = 0;
let ncalled = 3;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

nit: camelCase nCalled

jasnell added a commit that referenced this pull request Aug 8, 2017
PR-URL: #14616
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>

jasnell commented Aug 8, 2017

Copy link
Copy Markdown
Member Author

Landed in 7192e91

jasnell closed this Aug 8, 2017
addaleax pushed a commit that referenced this pull request Aug 10, 2017
PR-URL: #14616
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
addaleax mentioned this pull request Aug 13, 2017
MylesBorins pushed a commit that referenced this pull request Sep 19, 2017
PR-URL: #14616
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Refael Ackermann <refack@gmail.com>
MylesBorins mentioned this pull request Sep 20, 2017
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

Labels

test Issues and PRs related to the tests. timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL