Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Dec 7, 2016

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected 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.

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.
@Trott Trott added net Issues and PRs related to the net subsystem. smartos Issues and PRs related to the SmartOS platform. test Issues and PRs related to the tests. labels Dec 7, 2016
@Trott
Copy link
Member Author

Trott commented Dec 7, 2016

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: |-

@Trott
Copy link
Member Author

Trott commented Dec 7, 2016

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 32 and the number of times the test appears in the command line depending on how well-provisioned a machine is.

This same command succeeds with the changes in this PR even if I double it to 64.

@Trott
Copy link
Member Author

Trott commented Dec 7, 2016

@nodejs/testing

Copy link
Member

@mhdawson mhdawson left a 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.

@Trott
Copy link
Member Author

Trott commented Dec 7, 2016

@cjihrig cjihrig mentioned this pull request Dec 8, 2016
3 tasks
@cjihrig
Copy link
Contributor

cjihrig commented Dec 8, 2016

CI is good. Let's fast track this.

Trott added a commit to Trott/io.js that referenced this pull request Dec 8, 2016
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>
@Trott
Copy link
Member Author

Trott commented Dec 8, 2016

Agree with @cjihrig on fast-tracking...landing...

@Trott
Copy link
Member Author

Trott commented Dec 8, 2016

Landed in 6dd0754

@Trott Trott closed this Dec 8, 2016
Fishrock123 pushed a commit that referenced this pull request Dec 13, 2016
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>
@italoacasas italoacasas mentioned this pull request Dec 15, 2016
MylesBorins pushed a commit that referenced this pull request Jan 16, 2017
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>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
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>
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Jan 31, 2017
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>
@Trott Trott deleted the socket-timeout branch January 13, 2022 22:44
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Issues and PRs related to the net subsystem. smartos Issues and PRs related to the SmartOS platform. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants