Skip to content

Conversation

@Trott
Copy link
Member

@TrottTrott commented Dec 1, 2017

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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-botnodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. test Issues and PRs related to the tests. labels Dec 1, 2017
Copy link
Contributor

@maclover7maclover7 left a 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

Copy link
Contributor

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.

Copy link
Member

@mhdawsonmhdawson left a 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.
@TrottTrottforce-pushed the no-port-in-parallel branch from a691006 to 9062864CompareDecember 4, 2017 22:14
@Trott
Copy link
MemberAuthor

Trott commented Dec 4, 2017

Nits addressed. (Thanks, @mscdex!)

CI: https://ci.nodejs.org/job/node-test-pull-request/11873/

Trott added a commit to Trott/io.js that referenced this pull request Dec 5, 2017
`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]>
@Trott
Copy link
MemberAuthor

Trott commented Dec 5, 2017

Landed in e183900

@TrottTrott closed this Dec 5, 2017
MylesBorins pushed a commit that referenced this pull request Dec 12, 2017
`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 pushed a commit that referenced this pull request Dec 12, 2017
`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]>
@MylesBorinsMylesBorins mentioned this pull request Dec 12, 2017
@gibfahn
Copy link
Member

Should land cleanly once #17296 lands

gibfahn pushed a commit that referenced this pull request Apr 12, 2018
`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]>
@gibfahn
Copy link
Member

gibfahn commented Apr 12, 2018

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

notok1781async-hooks/test-graph.tcp---duration_ms: 0.682 severity: failstack: |-/home/iojs/build/workspace/node-test-commit-arm/nodes/ubuntu1604-arm64/test/async-hooks/test-graph.tcp.js:20net.connect({port: server.address().port,host: '::1'},^TypeError: Cannotreadproperty'port'ofnullatObject.<anonymous>(/home/iojs/build/workspace/node-test-commit-arm/nodes/ubuntu1604-arm64/test/async-hooks/test-graph.tcp.js:20:37)atModule._compile(module.js:652:30)atObject.Module._extensions..js(module.js:663:10)atModule.load(module.js:565:32)attryModuleLoad(module.js:505:12)atFunction.Module._load(module.js:497:3)atFunction.Module.runMain(module.js:693:10)atstartup(bootstrap_node.js:184:16)atbootstrap_node.js:605:3 ... ok1782async-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.

@MylesBorinsMylesBorins mentioned this pull request May 2, 2018
@TrottTrott deleted the no-port-in-parallel branch January 13, 2022 22:48
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async_hooksIssues and PRs related to the async hooks subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

11 participants

@Trott@gibfahn@lance@mscdex@lpinca@cjihrig@maclover7@hiroppy@mhdawson@BethGriggs@nodejs-github-bot