-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: clean up net server try ports test #8458
Conversation
LGTM if green |
socket.destroy(); | ||
}); | ||
|
||
var server2errors = 0; | ||
let server2errors = 0; | ||
|
||
server2.on('error', function(e) { | ||
server2errors++; |
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.
Why not get rid of this variable too and wrap the 'error'
event handler in a common.mustCall()
instead? That will ensure it gets called exactly once.
e91f6c5
to
d2af1ef
Compare
@mscdex thanks for the advice |
LGTM |
LGTM if CI is still ok with it: https://ci.nodejs.org/job/node-test-pull-request/3988/ |
Looks like an unrelated failure ^
|
@tlhunter Yeah that can be ignored for this PR |
|
||
server1.listen(0, function() { | ||
server1.listen(0, common.mustCall(function() { | ||
console.error('server1 listening'); |
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.
I think removing both console.error
could be a good idea.
LGTM with one suggestion |
d2af1ef
to
a75f5c1
Compare
* Replace var's with const and let * Replace boolean flags with common.mustCall() * Using stricter comparisons * Fixed typo in comment
a75f5c1
to
7449831
Compare
@santigimeno |
LGTM. Thanks! |
One last CI because you never know: https://ci.nodejs.org/job/node-test-pull-request/3993/ |
CI errors are unrelated. CI looks good. |
LGTM |
Landed in 2d7fa3d. 🎉 |
* Replace var's with const and let * Replace boolean flags with common.mustCall() * Using stricter comparisons * Fixed typo in comment PR-URL: #8458 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Replace var's with const and let * Replace boolean flags with common.mustCall() * Using stricter comparisons * Fixed typo in comment PR-URL: #8458 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Replace var's with const and let * Replace boolean flags with common.mustCall() * Using stricter comparisons * Fixed typo in comment PR-URL: #8458 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Replace var's with const and let * Replace boolean flags with common.mustCall() * Using stricter comparisons * Fixed typo in comment PR-URL: #8458 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Replace var's with const and let * Replace boolean flags with common.mustCall() * Using stricter comparisons * Fixed typo in comment PR-URL: #8458 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Replace var's with const and let * Replace boolean flags with common.mustCall() * Using stricter comparisons * Fixed typo in comment PR-URL: #8458 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Checklist
make -j4 test
(UNIX)Affected core subsystem(s)
test
Description of change