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

test: update test-http-timeout-overflow to use common.mustCall by collin5 · Pull Request #17528 · nodejs/node · GitHub

/ node Public

test: update test-http-timeout-overflow to use common.mustCall - #17528

Closed
collin5 wants to merge 2 commits into
nodejs:masterfrom
collin5:fix-issue-17169
Closed

test: update test-http-timeout-overflow to use common.mustCall#17528
collin5 wants to merge 2 commits into
nodejs:masterfrom
collin5:fix-issue-17169

Conversation

collin5 commented Dec 7, 2017
edited
Loading

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

Updated tests in /test/parallel/test-http-timeout-overflow.js to use Countdown module.

Ref issue #17169

nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 7, 2017

apapirovski 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

Hi @collin5 — thank you for taking this on! this particular test would be better with using common.mustCall for both the function within http.createServer and within res.on('end'). Then the process.on('exit') block can also be removed.

Countdown is better when used for tests where n > 1.

response.end('OK');
});

const server = http.createServer(function(req, res) {

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 could be common.mustCall(function(req, res) { /* function body */ }) which would then confirm that it executes during the duration of the test. Then no Countdown is needed.

collin5 Dec 8, 2017
edited
Loading

Copy link
Copy Markdown
Contributor 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

@apapirovski Right, that actually makes more sense. Let me do it ASAP 👍

@@ -45,8 +50,7 @@ server.listen(0, function() {
req.clearTimeout(callback);

res.on('end', function() {

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 can also use common.mustCall so common.mustCall(function() { /* function body */ }).

collin5 commented Dec 8, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

@apapirovski Thanks for the feedback, I've pushed the changes 👍.
I've also realized that this also applies to some of the tests we have in this list. I think adding info of what tests should use common.mustCall over the Countdown module may be a good idea.

apapirovski 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

LGTM. Thanks for making the changes!

Copy link
Copy Markdown
Contributor

apapirovski changed the title test: update test-http-timeout-overflow to use countdown timer test: update test-http-timeout-overflow to use common.mustCall Dec 8, 2017

Copy link
Copy Markdown
Contributor

Landed in d2626ef. Thank you for your contribution, @collin5, and congrats on becoming a Contributor! 🎉

apapirovski closed this Dec 9, 2017
apapirovski pushed a commit that referenced this pull request Dec 9, 2017
PR-URL: #17528
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>

collin5 commented Dec 9, 2017

Copy link
Copy Markdown
Contributor Author

@apapirovski Thank you too 👍

collin5 deleted the fix-issue-17169 branch December 9, 2017 21:04
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
PR-URL: #17528
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
PR-URL: #17528
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
MylesBorins mentioned this pull request Dec 12, 2017
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
PR-URL: #17528
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn mentioned this pull request Dec 20, 2017
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
PR-URL: #17528
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
gibfahn mentioned this pull request Dec 20, 2017
gibfahn pushed a commit that referenced this pull request Dec 20, 2017
PR-URL: #17528
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL