-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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 #10172
Conversation
The setTimeout() call is unneeded. If the socket never times out, then the test will never finish. Because timers can be unreliable on machines under load, using setTimeout() here effectively creates a race condition.
Sample failure on CI: https://ci.nodejs.org/job/node-test-commit-smartos/5645/nodes=smartos15-64/console not ok 725 parallel/test-net-socket-timeout
---
duration_ms: 1.36
severity: fail
stack: |- |
Command to replicate failure on master: tools/test.py -j32 test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js test/parallel/test-net-socket-timeout.js May need to increase This same command succeeds with the changes in this PR even if I double it to |
@nodejs/testing |
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 if CI is green.
CI is good. Let's fast track this. |
The setTimeout() call is unneeded. If the socket never times out, then the test will never finish. Because timers can be unreliable on machines under load, using setTimeout() here effectively creates a race condition. PR-URL: nodejs#10172 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Agree with @cjihrig on fast-tracking...landing... |
Landed in 6dd0754 |
The setTimeout() call is unneeded. If the socket never times out, then the test will never finish. Because timers can be unreliable on machines under load, using setTimeout() here effectively creates a race condition. PR-URL: #10172 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
The setTimeout() call is unneeded. If the socket never times out, then the test will never finish. Because timers can be unreliable on machines under load, using setTimeout() here effectively creates a race condition. PR-URL: #10172 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
The setTimeout() call is unneeded. If the socket never times out, then the test will never finish. Because timers can be unreliable on machines under load, using setTimeout() here effectively creates a race condition. PR-URL: #10172 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
The setTimeout() call is unneeded. If the socket never times out, then the test will never finish. Because timers can be unreliable on machines under load, using setTimeout() here effectively creates a race condition. PR-URL: #10172 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
test net
Description of change
The setTimeout() call is unneeded. If the socket never times out, then
the test will never finish. Because timers can be unreliable on machines
under load, using setTimeout() here effectively creates a race
condition.