Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign uptest,dgram: harden test-dgram-bind-shared-ports.js #13100
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
FWIW you can run node-test-commit or node-stress-single-test on a branch of your fork of Node if you want. |
This comment has been minimized.
This comment has been minimized.
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(() => { |
This comment has been minimized.
This comment has been minimized.
Trott
May 18, 2017
•
Member
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. :-|
This comment has been minimized.
This comment has been minimized.
Is that a wink? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Found a bug when workers bind for port 0. Blocking until I fix it. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Landed in c9d45c4 |
This comment has been minimized.
This comment has been minimized.
|
Extra sanity of |
This comment has been minimized.
This comment has been minimized.
|
@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>
refack commentedMay 18, 2017
•
edited
mustCallandmustNotCallto all callbacksexitthe processes instead ofkillRef: #13055
Ref: #12999
Ref: #13526
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
dgram,cluster,test