-
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: refactor test-net-server-bind #13273
Conversation
{ | ||
const server = net.createServer(common.mustNotCall()); | ||
|
||
server.listen(common.PORT + 1, function() { |
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: I'd use common.mustCall()
here and below.
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.
@lpinca Done! Thanks!
82ec4d3
to
fd49d14
Compare
{ | ||
const server = net.createServer(common.mustNotCall()); | ||
|
||
server.listen(common.mustCall(common.mustCall(function() { |
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: there is common.mustCall()
inception now :) One can be removed.
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.
Embarrassingly, that wasn't even a copy/paste error.
Fixed.
* Use common.mustNotCall() and common.mustCall() as appropriate * Use block scoping * Move assertions out of `exit` handler and into callbacks * Order assert.strictEqual() args per docs * Remove console.log() calls * Move test from `parallel` to `sequential` so `common.PORT` can be used without conflicting with OS-provided ports in other `parallel` tests
fd49d14
to
5221c22
Compare
* Use common.mustNotCall() and common.mustCall() as appropriate * Use block scoping * Move assertions out of `exit` handler and into callbacks * Order assert.strictEqual() args per docs * Remove console.log() calls * Move test from `parallel` to `sequential` so `common.PORT` can be used without conflicting with OS-provided ports in other `parallel` tests PR-URL: nodejs#13273 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Landed in e824c75 |
* Use common.mustNotCall() and common.mustCall() as appropriate * Use block scoping * Move assertions out of `exit` handler and into callbacks * Order assert.strictEqual() args per docs * Remove console.log() calls * Move test from `parallel` to `sequential` so `common.PORT` can be used without conflicting with OS-provided ports in other `parallel` tests PR-URL: #13273 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* Use common.mustNotCall() and common.mustCall() as appropriate * Use block scoping * Move assertions out of `exit` handler and into callbacks * Order assert.strictEqual() args per docs * Remove console.log() calls * Move test from `parallel` to `sequential` so `common.PORT` can be used without conflicting with OS-provided ports in other `parallel` tests PR-URL: #13273 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* Use common.mustNotCall() and common.mustCall() as appropriate * Use block scoping * Move assertions out of `exit` handler and into callbacks * Order assert.strictEqual() args per docs * Remove console.log() calls * Move test from `parallel` to `sequential` so `common.PORT` can be used without conflicting with OS-provided ports in other `parallel` tests PR-URL: #13273 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
exit
handler and into callbacksparallel
tosequential
socommon.PORT
can be usedwithout conflicting with OS-provided ports in other
parallel
testsChecklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test net