-
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: remove common.PORT from parallel tests #17410
Conversation
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.
LGTM as long as CI passes
@@ -38,7 +38,7 @@ const { | |||
|
|||
const client = net.connect({ | |||
host: addresses.INVALID_HOST, | |||
port: common.PORT, | |||
port: 80, // port number doesn't matter because hosst name is invalid |
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.
Typo in comment.
It might be a good idea to add a common.mustNotCall()
for the 'connect'
event.
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.
LGTM once @mscdex comments are addressed
`common.PORT` should not be used in parallel tests because another test may experience a collision with `common.PORT` when using port 0 to get an open port. This has been observed to result in test failures in CI.
a691006
to
9062864
Compare
Nits addressed. (Thanks, @mscdex!) |
`common.PORT` should not be used in parallel tests because another test may experience a collision with `common.PORT` when using port 0 to get an open port. This has been observed to result in test failures in CI. PR-URL: nodejs#17410 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Lance Ball <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Landed in e183900 |
`common.PORT` should not be used in parallel tests because another test may experience a collision with `common.PORT` when using port 0 to get an open port. This has been observed to result in test failures in CI. PR-URL: #17410 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Lance Ball <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
`common.PORT` should not be used in parallel tests because another test may experience a collision with `common.PORT` when using port 0 to get an open port. This has been observed to result in test failures in CI. PR-URL: #17410 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Lance Ball <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Should land cleanly once #17296 lands |
`common.PORT` should not be used in parallel tests because another test may experience a collision with `common.PORT` when using port 0 to get an open port. This has been observed to result in test failures in CI. PR-URL: #17410 Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Lance Ball <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@MylesBorins I've just landed this on v8.x-staging (conflicts were resolved due to @joyeecheung 's backport of #17296). This fixes test failures like: not ok 1781 async-hooks/test-graph.tcp
---
duration_ms: 0.682
severity: fail
stack: |-
/home/iojs/build/workspace/node-test-commit-arm/nodes/ubuntu1604-arm64/test/async-hooks/test-graph.tcp.js:20
net.connect({ port: server.address().port, host: '::1' },
^
TypeError: Cannot read property 'port' of null
at Object.<anonymous> (/home/iojs/build/workspace/node-test-commit-arm/nodes/ubuntu1604-arm64/test/async-hooks/test-graph.tcp.js:20:37)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:184:16)
at bootstrap_node.js:605:3
...
ok 1782 async-hooks/test-embedder.api.async-resource.improper-order
---
duration_ms: 1.155
... So if you start seeing those you may want to prioritise getting this landed on 6.x. |
common.PORT
should not be used in parallel tests because another testmay experience a collision with
common.PORT
when using port 0 to getan open port. This has been observed to result in test failures in CI.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test