test: dynamic port in test cluster disconnect#12545
test: dynamic port in test cluster disconnect#12545sebastianplesciuc wants to merge 1 commit intonodejs:masterfrom sebastianplesciuc:common-port-cluster-disconnect
Conversation
|
Uhm. I'm not really sure why the |
Not your fault, timeout issue. CI can be considered Green on Windows. |
There was a problem hiding this comment.
Shouldn't the second argument of splice be 1?
There was a problem hiding this comment.
You're absolutely right. Thanks for pointing that out. I missed it somehow. I've pushed the changes.
There was a problem hiding this comment.
Nit: if this change will not be backported to v4 we can use Array.prototype.includes() instead of Array.prototype.indexOf().
There was a problem hiding this comment.
Please let me know if I should change it. It will also require a new CI build.
There was a problem hiding this comment.
IMHO can land as is (found 433 hits to indexOf in /test/*.js)
@lpinca since v4 entered maintenance, do you think we can eliminate all 433 now (in a different PR)?
There was a problem hiding this comment.
@refack yes, not sure if it's worth the effort though.
|
I'm looking at https://ci.nodejs.org/job/node-test-commit-linux/nodes=fedora22/9316/console and I can't tell why it failed. Help? |
|
@sebastianplesciuc Infrastructure failure, don't worry about it. That buildbot is getting the ax soon anyway (ref). |
There was a problem hiding this comment.
IMHO can land as is (found 433 hits to indexOf in /test/*.js)
@lpinca since v4 entered maintenance, do you think we can eliminate all 433 now (in a different PR)?
There was a problem hiding this comment.
Please use camelCase in JavaScript code.
There was a problem hiding this comment.
Will we be backporting PRs that fix potentially flaky tests to v4.x? If not (or these common.PORT tests will just be moved to sequential in v4.x), using Array.prototype.includes() might be more readable here.
/cc @nodejs/lts
There was a problem hiding this comment.
Will we be backporting PRs that fix potentially flaky tests to v4.x?
Almost certainly not. ! serverPorts.includes(address.port) should be fine here.
There was a problem hiding this comment.
Changed it to use includes and rebased this branch to the latest master. Thanks!
There was a problem hiding this comment.
You might want to use a Set, not an array.
Removed common.PORT from test-cluster-disconnect to eliminate the possibility that a port used in another test will collide with common.PORT. Refs: #12376
|
Landed in bee250c |
Removed common.PORT from test-cluster-disconnect to eliminate the possibility that a port used in another test will collide with common.PORT. PR-URL: #12545 Refs: #12376 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
|
Adding the |
Removed common.PORT from test-cluster-disconnect to eliminate the possibility that a port used in another test will collide with common.PORT. PR-URL: nodejs#12545 Refs: nodejs#12376 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Removed common.PORT from test-cluster-disconnect to eliminate the possibility that a port used in another test will collide with common.PORT. PR-URL: #12545 Refs: #12376 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Removed common.PORT from test-cluster-disconnect to eliminate the possibility that a port used in another test will collide with common.PORT. PR-URL: #12545 Refs: #12376 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Removed common.PORT from test-cluster-disconnect to eliminate the
possibility that a dynamic port used in another test will collide
with common.PORT.
Refs: #12376
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test