Skip to content

test: test various calling patterns of net.connect() related functions - #11847

Closed
joyeecheung wants to merge 5 commits into
nodejs:masterfrom
joyeecheung:net-connect-test
Closed

test: test various calling patterns of net.connect() related functions#11847
joyeecheung wants to merge 5 commits into
nodejs:masterfrom
joyeecheung:net-connect-test

Conversation

@joyeecheung

@joyeecheungjoyeecheung commented Mar 14, 2017

Copy link
Copy Markdown
Member

Related: #11761
This PR adds coverage to more calling patterns of net.connect:

  • Cover the calling pattern net.connect(), net.createConnection(), new Socket().connect() with/without callback, with port passed in plain argument/in option
  • Refactor test-net-create-connection.js and rename it to test-net-connect-options-port.js
  • Add tests for connect(path)
  • Refactor test-net-connect-options.js, add tests for more new Socket() options.
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, net

@joyeecheung

joyeecheung commented Mar 14, 2017

Copy link
Copy Markdown
MemberAuthor

@joyeecheungjoyeecheung added net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests. labels Mar 14, 2017
@joyeecheung

Copy link
Copy Markdown
MemberAuthor

Error messages vary on different machines..loosen up the message validation and try again. CI: https://ci.nodejs.org/job/node-test-pull-request/6850/

@joyeecheungjoyeecheung changed the title test: test various calling patterns of net.connect() related functions[WIP]test: test various calling patterns of net.connect() related functionsMar 15, 2017
@joyeecheung
joyeecheungforce-pushed the net-connect-test branch 2 times, most recently from 046cc82 to 969e285CompareMarch 15, 2017 07:34
@joyeecheung
joyeecheungforce-pushed the net-connect-test branch 10 times, most recently from d2d8b48 to 40e984dCompareMarch 15, 2017 11:35
@joyeecheungjoyeecheung changed the title [WIP]test: test various calling patterns of net.connect() related functionstest: test various calling patterns of net.connect() related functionsMar 16, 2017
@joyeecheung

Copy link
Copy Markdown
MemberAuthor

Something is wrong with net.connect({fd: TCPfd})(keep getting ENOTCONN or flaky libuv assertion failures)..probably has something to do with the state management. I'll remove it from this PR for now and investigate later. Pipe fd works fine though.

@jasnell PTAL, thanks.

CI is green now: https://ci.nodejs.org/job/node-test-pull-request/6867/

@jasnell

Copy link
Copy Markdown
Member

Still LGTM!

jasnell pushed a commit that referenced this pull request Mar 16, 2017
PR-URL: #11847
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnell

Copy link
Copy Markdown
Member

Landed in 7b830f4

@jasnelljasnell closed this Mar 16, 2017
jungx098 pushed a commit to jungx098/node that referenced this pull request Mar 21, 2017
PR-URL: nodejs#11847
Reviewed-By: James M Snell <jasnell@gmail.com>
@italoacasas

Copy link
Copy Markdown

This PR need backport to v7

@gibfahn

Copy link
Copy Markdown
Member

@joyeecheung Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

If it is backported, the PR should include #12601.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

netIssues and PRs related to the net subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@joyeecheung@jasnell@italoacasas@gibfahn@addaleax