Skip to content

test: fix flaky test-net-socket-timeout - #10172

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:socket-timeout
Closed

test: fix flaky test-net-socket-timeout#10172
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:socket-timeout

Conversation

@Trott

@TrottTrott commented Dec 7, 2016

Copy link
Copy Markdown
Member
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.
@TrottTrott 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

Trott commented Dec 7, 2016

Copy link
Copy Markdown
MemberAuthor

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

Trott commented Dec 7, 2016

Copy link
Copy Markdown
MemberAuthor

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

Trott commented Dec 7, 2016

Copy link
Copy Markdown
MemberAuthor

@nodejs/testing

@mhdawsonmhdawson left a comment

Copy link
Copy Markdown
Member

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

Trott commented Dec 7, 2016

Copy link
Copy Markdown
MemberAuthor

@cjihrigcjihrig mentioned this pull request Dec 8, 2016
3 tasks
@cjihrig

Copy link
Copy Markdown
Contributor

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

Trott commented Dec 8, 2016

Copy link
Copy Markdown
MemberAuthor

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

@Trott

Trott commented Dec 8, 2016

Copy link
Copy Markdown
MemberAuthor

Landed in 6dd0754

@TrottTrott 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>
@italoacasasitaloacasas 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>
@MylesBorinsMylesBorins 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
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

netIssues and PRs related to the net subsystem.smartosIssues and PRs related to the SmartOS platform.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Trott@cjihrig@santigimeno@mhdawson@MylesBorins