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: add logging for test-debug-port-cluster #6769

Closed
wants to merge 2 commits into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented May 15, 2016

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

test debugger

Description of change

The test is currently flaky and CI provides no real information because
the test times out rather than failing on an assertion. Add logging to
gather more information about the failure.

@Trott Trott added debugger test Issues and PRs related to the tests. labels May 15, 2016
@Trott
Copy link
Member Author

Trott commented May 15, 2016

Refs: #6754

@mscdex mscdex added the cluster Issues and PRs related to the cluster subsystem. label May 15, 2016
@Trott
Copy link
Member Author

Trott commented May 15, 2016

The refactoring in this PR appears to resolve the test flakiness issue.

Stress test with this PR: https://ci.nodejs.org/job/node-stress-single-test/722/nodes=freebsd102-64/console

Stress test with current master: https://ci.nodejs.org/job/node-stress-single-test/721/nodes=freebsd102-64/console

for (let port = PORT_MIN; port <= PORT_MAX; port += 1) {
assert(stderr.includes(`Debugger listening on port ${port}`));
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should really be some at-exit check that verifies whether this code is reached.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bnoordhuis Ah, yes, good point. I've extracted the for loop to its own function and wrapped it in common.mustCall() so there will be an at-exit check that the function ran. Stress testing now to see if that re-introduces the problem or not. (If it does, I guess my "solution" was to not check when the problem arose. :-( )

The test is currently flaky and CI provides no real information because
the test times out rather than failing on an assertion. Add logging to
gather more information about the failure.

Refs: nodejs#6754
@cjihrig
Copy link
Contributor

cjihrig commented May 16, 2016

LGTM. This PR's stress test is green.

@Trott
Copy link
Member Author

Trott commented May 16, 2016

@Trott
Copy link
Member Author

Trott commented May 16, 2016

Stress tests appear kind of meaningless because for each stress test, the test either always succeeds or always fails.

But the logging appears to be helpfule:

not ok 362 parallel/test-debug-port-cluster
# TIMEOUT
# [DATA] Error: listen EADDRINUSE :::13683
#     at Object.exports._errnoException (util.js:953:11)
#     at exports._exceptionWithHostPort (util.js:976:20)
#     at Agent.Server._listen2 (net.js:1253:14)
#     at listen (net.js:1289:10)
#     at Agent.Server.listen (net.js:1385:5)
#     at Object.start (_debug_agent.js:21:9)
#     at startup (node.js:86:44)
#     at node.js:445:3

Remove port increment by `1337` which appears to sometimes result in a
port that is already in use. There is no reason not to use
`common.PORT`.
@Trott
Copy link
Member Author

Trott commented May 16, 2016

Removed the common.PORT + 1337 stuff and just using common.PORT instead. Seems to fix the flakiness. CI: https://ci.nodejs.org/job/node-test-commit/3361/

@Trott
Copy link
Member Author

Trott commented May 16, 2016

FreeBSD failure appears unrelated. Opened a separate issue for it.

@Trott
Copy link
Member Author

Trott commented May 16, 2016

Running CI three more times just to make sure the flakiness is really truly gone. (Stress tests don't seem to be meaningful for this one, although I guess they could be useful to avoid exercising all the other tests unnecessarily. ¯_(ツ)_/¯)

Trott added a commit to Trott/io.js that referenced this pull request May 18, 2016
The test is currently flaky and CI provides no real information because
the test times out rather than failing on an assertion. Add logging to
gather more information about the failure.

Refs: nodejs#6754
PR-URL: nodejs#6769
Reviewed-By: Colin Ihrig <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request May 18, 2016
Remove port increment by `1337` which appears to sometimes result in a
port that is already in use. There is no reason not to use
`common.PORT`.

PR-URL: nodejs#6769
Fixes: nodejs#6754
Reviewed-By: Colin Ihrig <[email protected]>
@Trott
Copy link
Member Author

Trott commented May 18, 2016

Landed in 2c926dc and 0350505

@rvagg
Copy link
Member

rvagg commented May 20, 2016

marking as lts-watch-v4.x as I just experienced a failure on v4.x for test-debug-port-cluster

MylesBorins pushed a commit that referenced this pull request May 23, 2016
The test is currently flaky and CI provides no real information because
the test times out rather than failing on an assertion. Add logging to
gather more information about the failure.

Refs: #6754
PR-URL: #6769
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 23, 2016
Remove port increment by `1337` which appears to sometimes result in a
port that is already in use. There is no reason not to use
`common.PORT`.

PR-URL: #6769
Fixes: #6754
Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorins MylesBorins mentioned this pull request May 23, 2016
Fishrock123 pushed a commit that referenced this pull request May 23, 2016
The test is currently flaky and CI provides no real information because
the test times out rather than failing on an assertion. Add logging to
gather more information about the failure.

Refs: #6754
PR-URL: #6769
Reviewed-By: Colin Ihrig <[email protected]>
Fishrock123 pushed a commit that referenced this pull request May 23, 2016
Remove port increment by `1337` which appears to sometimes result in a
port that is already in use. There is no reason not to use
`common.PORT`.

PR-URL: #6769
Fixes: #6754
Reviewed-By: Colin Ihrig <[email protected]>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
The test is currently flaky and CI provides no real information because
the test times out rather than failing on an assertion. Add logging to
gather more information about the failure.

Refs: #6754
PR-URL: #6769
Reviewed-By: Colin Ihrig <[email protected]>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
Remove port increment by `1337` which appears to sometimes result in a
port that is already in use. There is no reason not to use
`common.PORT`.

PR-URL: #6769
Fixes: #6754
Reviewed-By: Colin Ihrig <[email protected]>
@Trott Trott deleted the beech branch January 13, 2022 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster Issues and PRs related to the cluster subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants