-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Conversation
cc: @nodejs/testing |
{ | ||
// Test the case of unref()'ing a socket with a handle. | ||
const s = dgram.createSocket('udp4'); | ||
s.bind(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Thanks!
There was a problem hiding this 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?
This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods. PR-URL: nodejs#11240 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods. PR-URL: #11240 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods. PR-URL: nodejs#11240 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods. PR-URL: nodejs#11240 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Landing on v6. Needs a backport PR if it should land on v4 |
This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods. PR-URL: #11240 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit completes code coverage for dgram's Socket#ref() and Socket#unref() methods. PR-URL: #11240 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit completes code coverage for
dgram
'sSocket#ref()
andSocket#unref()
methods.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test