-
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 modifcation to common.PORT #6990
Conversation
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. Refs: nodejs#6989
/cc @rvagg |
@Trott LGTM It seems like there are a few other instances... specifically in the debugger tests... would you be open to changing all of these instances in this PR? |
My grep fu finds these:
There are several more that add a single digit number but those look Mostly Harmless. The changes in this PR LGTM although comments should preferably be capitalized and punctuated and have two spaces before the |
LGTM |
Why not take this opportunity to just use |
LGTM |
If that works, that would also solve the problem where one test doesn't clean up after itself and subsequent tests start getting |
That won't work for debugger tests until #5025 lands. Dusting off that PR is on my TODO list, though. |
LGTM |
@@ -3,7 +3,7 @@ const common = require('../common'); | |||
const assert = require('assert'); | |||
const spawn = require('child_process').spawn; | |||
|
|||
const PORT_MIN = common.PORT; | |||
const PORT_MIN = common.PORT + 1; // fixture uses common.PORT |
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.
Would be less confusing to assign to a special port in fixtures?
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 thought so too at first, but it turns out that the fixture uses a single port, while this uses use multiple ports. Less weird IMO to give the common.PORT
to the fixture and let this use special ports rather than have both using special ports and needing to make sure that the special ports don't collide.
CI again, although fail on Raspberry Pi is certainly unrelated: https://ci.nodejs.org/job/node-test-pull-request/2843/ |
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: nodejs#6990 Refs: nodejs#6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Landed in bddfe63 @thealphanerd @bnoordhuis I'll pick off the remaining instances in a subsequent PR. |
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. Refs: nodejs#6990
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: nodejs#6990 Refs: nodejs#6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. PR-URL: nodejs#7055 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Refs: nodejs#6990
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: #6990 Refs: #6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. PR-URL: #7055 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Refs: #6990
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: #6990 Refs: #6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. PR-URL: #7055 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Refs: #6990
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: #6990 Refs: #6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. PR-URL: #7055 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Refs: #6990
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: #6990 Refs: #6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. PR-URL: #7055 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Refs: #6990
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: #6990 Refs: #6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. PR-URL: #7055 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Refs: #6990
A possibly-buggy fixture server uses `common.PORT+1000` for its port rather than `common.PORT`. That could result in it clashing with other ports if tests are run in parallel. The test runner increments `common.PORT` by 100 for each running instance for tests. Change to use common.PORT and have the tests that use the fixture start with common.PORT+1 for anything they need. PR-URL: #6990 Refs: #6989 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. PR-URL: #7055 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Refs: #6990
Checklist
Affected core subsystem(s)
test debugger
Description of change
A possibly-buggy fixture server uses
common.PORT+1000
for its portrather than
common.PORT
. That could result in it clashing with otherports if tests are run in parallel. The test runner increments
common.PORT
by 100 for each running instance for tests. Change to usecommon.PORT and have the tests that use the fixture start with
common.PORT+1 for anything they need.
Refs: #6989