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: improve debug-break-on-uncaught reliability #6793

Closed
wants to merge 3 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented May 16, 2016

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

test debugger

Description of change

Move test-debug-break-on-uncaught from debugger directory to
sequential so that it gets exercised by make test and via the
continuous integration server for the project.

Removed unnecessary port number modification that is probable source of
unreliability on CI.

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

Trott commented May 16, 2016

@jasnell
Copy link
Member

jasnell commented May 16, 2016

LGTM if CI is green.

@claudiorodriguez
Copy link
Contributor

Test is failing on several platforms with this:

not ok 1116 sequential/test-debug-break-on-uncaught
# 
# assert.js:90
#   throw new assert.AssertionError({
#   ^
# AssertionError: debugger did not pause on exception
#     at assertHasPaused (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1204-64/test/sequential/test-debug-break-on-uncaught.js:91:12)
#     at tryOnTimeout (timers.js:224:11)
#     at Timer.listOnTimeout (timers.js:198:5)
# **[ global.js ]**
# **[ timeout.js ]**

@Trott
Copy link
Member Author

Trott commented May 20, 2016

CI again to see if platforms are failing consistently or not: https://ci.nodejs.org/job/node-test-pull-request/2718/

@Trott
Copy link
Member Author

Trott commented May 21, 2016

The use of setTimeout() seemed suspicious so I refactored the test to check what was going on a bit more carefully, ran another CI, and sure enough...

https://ci.nodejs.org/job/node-test-commit-linux/3463/nodes=ubuntu1404-64/console

not ok 1121 sequential/test-debug-break-on-uncaught
# 
# assert.js:90
#   throw new assert.AssertionError({
#   ^
# AssertionError: no exceptions thrown, race condition in test?
#     at assertHasPaused (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1404-64/test/sequential/test-debug-break-on-uncaught.js:91:5)
#     at tryOnTimeout (timers.js:224:11)
#     at Timer.listOnTimeout (timers.js:198:5)
# **[ global.js ]**
# **[ timeout.js ]**
  ---
  duration_ms: 1.10

@Trott
Copy link
Member Author

Trott commented May 21, 2016

The latest change makes stuff better but still lots of fail. I'm going to move it back to test/debugger where it won't bother anyone but leave the improvements in case someone else wants to pick it up...

@Trott
Copy link
Member Author

Trott commented May 21, 2016

Squashed and force pushed. PTAL.

@Trott Trott changed the title test: move debug-break-on-uncaught to sequential test: improve debug-break-on-uncaught reliability May 21, 2016
@Trott
Copy link
Member Author

Trott commented May 21, 2016

setTimeout(setupClient.bind(null, runTest), 200);

child.stderr.on('data', (data) => {
if (data.toString().includes('Debugger listening on port')) {
Copy link
Member

Choose a reason for hiding this comment

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

Assumes that lines correspond with data events. I'd concatenate the output and scan that.

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 True. Fixed.

@bnoordhuis
Copy link
Member

bnoordhuis commented May 22, 2016

LGTM with a suggestion.

@claudiorodriguez
Copy link
Contributor

LGTM

Trott added 3 commits May 22, 2016 20:50
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.
@Trott
Copy link
Member Author

Trott commented May 24, 2016

implemented @bnoordhuis suggestion...onward to CI: https://ci.nodejs.org/job/node-test-pull-request/2755/

@bnoordhuis
Copy link
Member

Still LGTM. Another java.nio.file.DirectoryNotEmptyException on vcbt2015.

/cc @nodejs/build - known issue? Happened several times yesterday, too.

Trott added a commit to Trott/io.js that referenced this pull request May 24, 2016
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.

PR-URL: nodejs#6793
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
@Trott
Copy link
Member Author

Trott commented May 24, 2016

Landed in ff00a48

@Trott Trott closed this May 24, 2016
Fishrock123 pushed a commit to Fishrock123/node that referenced this pull request May 30, 2016
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.

PR-URL: nodejs#6793
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
rvagg pushed a commit that referenced this pull request Jun 2, 2016
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.

PR-URL: #6793
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
@MylesBorins
Copy link
Contributor

@Trott lts?

@Trott
Copy link
Member Author

Trott commented Jul 11, 2016

@thealphanerd Yes, if it lands cleanly.

MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.

PR-URL: #6793
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.

PR-URL: #6793
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.

PR-URL: #6793
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jul 12, 2016
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.

PR-URL: #6793
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 14, 2016
Running the test through CI reveals unreliability due to a race
condition. These changes mitigate the race condition, but do not
eliminate it.

PR-URL: #6793
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Claudio Rodriguez <[email protected]>
@Trott Trott deleted the catch 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
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants