-
Notifications
You must be signed in to change notification settings - Fork 30k
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: fix flaky test-net-socket-timeout-unref #6003
Conversation
Throw immediately on socket timeout rather than checking boolean in exit handler. Fixes: nodejs#5128
Stress test confirming flakiness of current version on master: https://ci.nodejs.org/job/node-stress-single-test/584/nodes=pi2-raspbian-wheezy/console Stress test showing this version is not flaky: https://ci.nodejs.org/job/node-stress-single-test/583/nodes=pi2-raspbian-wheezy/console |
@nodejs/testing |
LGTM |
process.on('exit', function() { | ||
assert.strictEqual(timedout, false, | ||
'Socket timeout should not hold loop open'); | ||
sockets.push({socket: socket, timeout: T * 1000}); |
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.
should this timout be platform specific?
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.
This is a socket timeout and not a timer, so I'm inclined to not make it platform dependent if it doesn't need to be.
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.
ahhh... /me leaves and reads more about socket time outs
LGTM with above nit assuming CI is green |
Throw immediately on socket timeout rather than checking boolean in exit handler. PR-URL: nodejs#6003 Fixes: nodejs#5128 Reviewed-By: Myles Borins <[email protected]>
Landed in c60faf6 |
Throw immediately on socket timeout rather than checking boolean in exit handler. PR-URL: #6003 Fixes: #5128 Reviewed-By: Myles Borins <[email protected]>
Throw immediately on socket timeout rather than checking boolean in exit handler. PR-URL: #6003 Fixes: #5128 Reviewed-By: Myles Borins <[email protected]>
Pull Request check-list
Please make sure to review and check all of these items:
make -j8 test
(UNIX) orvcbuild test nosign
(Windows) pass withthis change (including linting)?
Affected core subsystem(s)
test, net
Description of change
Throw immediately on socket timeout rather than checking boolean in exit
handler.
Fixes: #5128