Skip to content

test: dynamic port in test cluster disconnect - #12545

Closed
sebastianplesciuc wants to merge 1 commit into
nodejs:masterfrom
sebastianplesciuc:common-port-cluster-disconnect
Closed

test: dynamic port in test cluster disconnect#12545
sebastianplesciuc wants to merge 1 commit into
nodejs:masterfrom
sebastianplesciuc:common-port-cluster-disconnect

Conversation

@sebastianplesciuc

Copy link
Copy Markdown

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Apr 20, 2017
@vsemozhetbytvsemozhetbyt added the cluster Issues and PRs related to the cluster subsystem. label Apr 20, 2017
@vsemozhetbyt

Copy link
Copy Markdown
Contributor

@sebastianplesciuc

Copy link
Copy Markdown
Author

Uhm. I'm not really sure why the test/windows-fanned build failed. Help?

@refack

Copy link
Copy Markdown
Contributor

Uhm. I'm not really sure why the test/windows-fanned build failed. Help?

Not your fault, timeout issue. CI can be considered Green on Windows.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the second argument of splice be 1?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're absolutely right. Thanks for pointing that out. I missed it somehow. I've pushed the changes.

@lpinca

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: if this change will not be backported to v4 we can use Array.prototype.includes() instead of Array.prototype.indexOf().

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please let me know if I should change it. It will also require a new CI build.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@refack yes, not sure if it's worth the effort though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sebastianplesciuc

Copy link
Copy Markdown
Author

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?

@bnoordhuis

Copy link
Copy Markdown
Member

@sebastianplesciuc Infrastructure failure, don't worry about it. That buildbot is getting the ax soon anyway (ref).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use camelCase in JavaScript code.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cjihrig Fixed! Thank you!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we be backporting PRs that fix potentially flaky tests to v4.x?

Almost certainly not. ! serverPorts.includes(address.port) should be fine here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to use includes and rebased this branch to the latest master. Thanks!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to use a Set, not an array.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aqrln Changed to use Set. Thank you!

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
@jasnell

Copy link
Copy Markdown
Member

@gibfahn

gibfahn commented May 11, 2017

Copy link
Copy Markdown
Member

Landed in bee250c

@gibfahngibfahn closed this May 11, 2017
gibfahn pushed a commit that referenced this pull request May 11, 2017
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>
@gibfahn

Copy link
Copy Markdown
Member

Adding the lts-watch label as we've seen this fail in CI.

anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
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>
@jasnelljasnell mentioned this pull request May 28, 2017
@gibfahngibfahn mentioned this pull request Jun 15, 2017
3 tasks
gibfahn pushed a commit that referenced this pull request Jun 20, 2017
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>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
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>
@MylesBorinsMylesBorins mentioned this pull request Jul 18, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clusterIssues and PRs related to the cluster subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@sebastianplesciuc@vsemozhetbyt@refack@lpinca@bnoordhuis@jasnell@gibfahn@cjihrig@aqrln@nodejs-github-bot