Skip to content

Conversation

@vperezma
Copy link
Contributor

remove process block and add common.mustCall

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 22, 2017
@vsemozhetbyt
Copy link
Contributor

// Immediate death socket
constimmediateDeath=net.connect(port);
establish(immediateDeath).destroy();
establish(immediateDeath,0).destroy();
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think it makes sense to pass 0 to common.mustCall() as the expected argument. I would expect any common.mustCall() to be passed a value of 1 (or undefined) or higher. If the intention is that it should never be called, common.mustNotCall() should be used instead.

Copy link
Member

Choose a reason for hiding this comment

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

undefined will result in the default of 1. I think either we need to be OK with sending 0 to common.mustCall() (I am, at least in this case) or else add some logic to switch out whether common.mustCall() or common.mustNotCall() gets called. That works too, although might be a bit much. I'm fine with either.

Copy link
Member

Choose a reason for hiding this comment

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

This one was a bit of let's get it working. establish() is called multiple times with different expected results each time and this was the easiest to get things going. The test as written, however, could use a bit of a bigger refactoring.

@mscdexmscdex added the tls Issues and PRs related to the tls subsystem. label Apr 22, 2017
@jasnelljasnell changed the title Change socket tlstest: use common.mustCall in test-tls-connect-given-socket.jsApr 24, 2017
@jasnelljasnell added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Apr 24, 2017
Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

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

LGTM if CI is green

Trott pushed a commit to Trott/io.js that referenced this pull request May 15, 2017
PR-URL: nodejs#12592 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
@Trott
Copy link
Member

Landed in 72e3dda.
Thanks for the contribution! 🎉

@TrottTrott closed this May 15, 2017
anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
PR-URL: nodejs#12592 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
@jasnelljasnell mentioned this pull request May 28, 2017
@gibfahngibfahn mentioned this pull request Jun 15, 2017
3 tasks
MylesBorins pushed a commit that referenced this pull request Jun 22, 2017
PR-URL: #12592 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
PR-URL: #12592 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]>
@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

code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.testIssues and PRs related to the tests.tlsIssues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@vperezma@vsemozhetbyt@Trott@mscdex@jasnell@MylesBorins@nodejs-github-bot