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: increase dgram ref()/unref() coverage #11240

Merged
merged 1 commit into from
Feb 10, 2017
Merged

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Feb 8, 2017

This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods.

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-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Feb 8, 2017
@mscdex mscdex added the dgram Issues and PRs related to the dgram subsystem / UDP. label Feb 8, 2017
@cjihrig
Copy link
Contributor Author

cjihrig commented Feb 10, 2017

cc: @nodejs/testing

{
// Test the case of unref()'ing a socket with a handle.
const s = dgram.createSocket('udp4');
s.bind();
Copy link
Member

Choose a reason for hiding this comment

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

Is the call to bind() necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The test will run without the bind(), but binding keeps the event loop open and causes the test to timeout if unref'ing doesn't actually work.

Copy link
Member

Choose a reason for hiding this comment

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

Got it. Thanks!

Copy link
Member

@santigimeno santigimeno left a comment

Choose a reason for hiding this comment

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

LGTM with a question?

@cjihrig
Copy link
Contributor Author

cjihrig commented Feb 10, 2017

This commit completes code coverage for dgram's Socket#ref() and
Socket#unref() methods.

PR-URL: nodejs#11240
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@cjihrig cjihrig merged commit b471392 into nodejs:master Feb 10, 2017
@cjihrig cjihrig deleted the ref-unref branch February 10, 2017 17:55
italoacasas pushed a commit that referenced this pull request Feb 13, 2017
This commit completes code coverage for dgram's Socket#ref() and
Socket#unref() methods.

PR-URL: #11240
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Feb 14, 2017
This commit completes code coverage for dgram's Socket#ref() and
Socket#unref() methods.

PR-URL: nodejs#11240
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
krydos pushed a commit to krydos/node that referenced this pull request Feb 25, 2017
This commit completes code coverage for dgram's Socket#ref() and
Socket#unref() methods.

PR-URL: nodejs#11240
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@jasnell
Copy link
Member

jasnell commented Mar 8, 2017

Landing on v6. Needs a backport PR if it should land on v4

jasnell pushed a commit that referenced this pull request Mar 8, 2017
This commit completes code coverage for dgram's Socket#ref() and
Socket#unref() methods.

PR-URL: #11240
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Mar 9, 2017
This commit completes code coverage for dgram's Socket#ref() and
Socket#unref() methods.

PR-URL: #11240
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dgram Issues and PRs related to the dgram subsystem / UDP. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants