| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
|
@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? |
Sorry, something went wrong.
|
My grep fu finds these: $ git grep -P 'PORT\s*\+\s*\d\d+' test/ test/debugger/helper-debugger-repl.js:var port = common.PORT + 1337; test/debugger/test-debugger-client.js:var debugPort = common.PORT + 1337; test/fixtures/clustered-server/app.js: server.listen(common.PORT+1000); test/parallel/test-debug-signal-cluster.js:var port = common.PORT + 42; 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 //. |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
|
Why not take this opportunity to just use 0 for the port and let the OS assign one? Death to common.PORT! |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
If that works, that would also solve the problem where one test doesn't clean up after itself and subsequent tests start getting EADDRINUSE errors. |
Sorry, something went wrong.
|
That won't work for debugger tests until #5025 lands. Dusting off that PR is on my TODO list, though. |
Sorry, something went wrong.
|
LGTM |
Sorry, something went wrong.
| 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.
Would be less confusing to assign to a special port in fixtures?
Sorry, something went wrong.
There was a problem hiding this comment.
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.
Sorry, something went wrong.
Sorry, something went wrong.
|
CI again, although fail on Raspberry Pi is certainly unrelated: https://ci.nodejs.org/job/node-test-pull-request/2843/ |
Sorry, something went wrong.
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 <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
Landed in bddfe63 @thealphanerd @bnoordhuis I'll pick off the remaining instances in a subsequent PR. |
Sorry, something went wrong.
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 <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Remove uses of `common.PORT + 1337` where `common.PORT` suffices. PR-URL: nodejs#7055 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> 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 <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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 <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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 <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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 <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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 <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
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 <myles.borins@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
| Back | FazBrowse Home | New Git URL |
Checklist
Affected core subsystem(s)
test debugger
Description of change
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: #6989