-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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,dgram: harden test-dgram-bind-shared-ports.js #13100
Conversation
FWIW you can run node-test-commit or node-stress-single-test on a branch of your fork of Node if you want. |
Thanks, I was vaguely aware of that, but was not sure... |
// an error is expected on the second worker | ||
process.send(`socket2:${err.code}`); | ||
}); | ||
socket2.close(common.mustCall(() => { |
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.
FWIW, I think this will only fire in the second worker. The first worker doesn't get an error on socket2
(and it's the first worker we care about for socket2
because it actually binds to the port).
Starting to wonder if whatever complexity is required to make socket2.close()
work isn't any greater than complexity that might be required to make port: 0
work for this test. :-|
Is that a wink? |
b0381e0
to
45323f0
Compare
Found a bug when workers bind for port 0. Blocking until I fix it. |
cluster
to share sockets when worker bind to port 0
Dry-run CI: https://ci.nodejs.org/job/node-test-pull-request/8551/ |
Landed in c9d45c4 |
Extra sanity of |
@refack could you please backport to v6.x? |
* add `mustCall` and `mustNotCall` to all callbacks * added `known_issue` for port binding PR-URL: nodejs#13100 Refs: nodejs#13055 Refs: nodejs#12999 Refs: nodejs#13526 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
mustCall
andmustNotCall
to all callbacksexit
the processes instead ofkill
Ref: #13055
Ref: #12999
Ref: #13526
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
dgram,cluster,test