Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 5 commits into from

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Mar 14, 2017

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
Copy link
Member Author

joyeecheung commented Mar 14, 2017

@joyeecheung joyeecheung 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
Member Author

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/

@joyeecheung joyeecheung changed the title test: test various calling patterns of net.connect() related functions [WIP]test: test various calling patterns of net.connect() related functions Mar 15, 2017
@joyeecheung joyeecheung force-pushed the net-connect-test branch 2 times, most recently from 046cc82 to 969e285 Compare March 15, 2017 07:34
@joyeecheung joyeecheung force-pushed the net-connect-test branch 10 times, most recently from d2d8b48 to 40e984d Compare March 15, 2017 11:35
@joyeecheung joyeecheung changed the title [WIP]test: test various calling patterns of net.connect() related functions test: test various calling patterns of net.connect() related functions Mar 16, 2017
@joyeecheung
Copy link
Member Author

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
Member

jasnell commented Mar 16, 2017

Still LGTM!

jasnell pushed a commit that referenced this pull request Mar 16, 2017
@jasnell
Copy link
Member

jasnell commented Mar 16, 2017

Landed in 7b830f4

@jasnell jasnell closed this Mar 16, 2017
jungx098 pushed a commit to jungx098/node that referenced this pull request Mar 21, 2017
@italoacasas
Copy link
Contributor

This PR need backport to v7

@gibfahn
Copy link
Member

gibfahn commented Jun 18, 2017

@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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants