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

test: refactor several parallel/test-timer tests by BethGriggs · Pull Request #10524 · nodejs/node · GitHub

/ node Public

test: refactor several parallel/test-timer tests - #10524

Closed
BethGriggs wants to merge 2 commits into
nodejs:masterfrom
BethGriggs:pr-test-timers-es6
Closed

test: refactor several parallel/test-timer tests#10524
BethGriggs wants to merge 2 commits into
nodejs:masterfrom
BethGriggs:pr-test-timers-es6

Conversation

Copy link
Copy Markdown
Member

Change var to const/let. Simplify test-timers-uncaught-exception.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

Refactored several of the parallel/test-timer-* tests - mainly changing vars to const and adding common.mustCall() where possible. parallel/test-timers-uncaught-exception has been simplified. Any further suggestions for improvement are welcome 😄

nodejs-github-bot added test Issues and PRs related to the tests. lts-watch-v6.x labels Dec 29, 2016
Comment thread test/parallel/test-timers-ordering.js Outdated

Trott Dec 29, 2016
edited
Loading

Copy link
Copy Markdown
Member

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

Since you're already in here refactoring, could you also change the assert.equal() on this line to assert.strictEqual()?

Copy link
Copy Markdown
Member Author

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

Updated - I missed that one

mscdex added the timers Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout. label Dec 29, 2016

Trott commented Dec 29, 2016

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/5624/ (although I guess we'll want to re-run it after the assert.equal() -> assert.strictEqual() change happens, but that's OK, might as well find any oddball platform-specific things that might be there sooner than later)

Fishrock123 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

Also, does test-timers-uncaught-exception.js still work even if you reduce the delays to 1?

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

This will fail because what was actually registered was a function returned from common.mustCall().

I don't think you can have async errors during exit though, so this should be unnecessary I think.

Copy link
Copy Markdown
Member Author

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

I removed the whole function.

Change var to const/let. Simplify test-timers-uncaught-exception.

Copy link
Copy Markdown
Member Author

@Fishrock123 updated to address comments, PTAL. Test still passes with 1ms timeout.

Fishrock123 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

gibfahn self-assigned this Jan 3, 2017

gibfahn commented Jan 3, 2017

Copy link
Copy Markdown
Member

Landed in 7c77932

gibfahn closed this Jan 3, 2017
gibfahn pushed a commit that referenced this pull request Jan 3, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

PR-URL: #10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

PR-URL: nodejs#10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 19, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

PR-URL: nodejs#10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
targos pushed a commit that referenced this pull request Jan 28, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

PR-URL: #10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
italoacasas mentioned this pull request Jan 29, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

PR-URL: nodejs#10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 30, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

PR-URL: nodejs#10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

Copy link
Copy Markdown
Contributor

This does not land cleanly in LTS. Would someone be willing to backport?

BethGriggs added a commit to BethGriggs/node that referenced this pull request Apr 18, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

PR-URL: nodejs#10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 24, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

Backport-PR-URL: #12401
PR-URL: #10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 24, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

Backport-PR-URL: #12401
PR-URL: #10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
MylesBorins mentioned this pull request Apr 29, 2017
andrew749 pushed a commit to michielbaird/node that referenced this pull request Jul 19, 2017
Change var to const/let. Simplify test-timers-uncaught-exception.

Backport-PR-URL: nodejs/node#12401
PR-URL: nodejs/node#10524
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
BethGriggs deleted the pr-test-timers-es6 branch February 21, 2018 15:36
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.

9 participants


Back | FazBrowse Home | New Git URL