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

Backport debugger test fixes v6.x #11184

Conversation

thefourtheye
Copy link
Contributor

Backporting #10371, #10455, #10597, #10822

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

This test expects the string 'Debugger listening on port' on stderr and
since the message has been changed to 'Debugger listening on host:port'
this was failing always.

Apart from that, this test expects the main script's name to be
`src/node.js`, but that has been renamed to `lib/internal/node.js` and
then to `lib/internal/bootstrap_node.js`. So, the script name has been
updated.

Apart from that, using `const` instead of `var` wherever possible.

Refer: nodejs#10361

PR-URL: nodejs#10371

Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
1. The test doesn't attach an event listener for `exit` events and
   removes them before killing. The intention is to fail the tests if
   the processes exit normally. This patch attaches the `exit` event
   handlers.

2. Replace `var`s with `let`s and `const`s.

3. Replace `==` based assertion with `strictEqual` assertion.

4. Use `common.PORT` instead of `5959`.

5. The test used to expect only one string "connecting to
   localhost:5959 ... ok", but the debugger actually emits another
   string, "break in test/fixtures/empty.js:2". This patch asserts if
   both of them are received in the same order.

Refer: nodejs#10361
PR-URL: nodejs#10455

Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
`process.title` would work properly only in FreeBSD, OSX, and Linux as
per test/parallel/test-setproctitle.js.

This patch makes sure that the test expects an empty string in other
platforms.

This patch helps fix the SmartOS failures in
https://ci.nodejs.org/job/node-test-commit/6962/ for
nodejs#10456

PR-URL: nodejs#10597
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Evan Lucas <[email protected]>
As the failures suggest, this test expects the uncaught exception to
be thrown within 100 milliseconds, but on some of the test machines it
takes longer than that limit to notify the exception. Thats why the
test was failing.

This patch polls every 10 ms to see if the exception is received.

PR-URL: nodejs#10822

Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
@nodejs-github-bot nodejs-github-bot added test Issues and PRs related to the tests. v6.x labels Feb 5, 2017
@mscdex mscdex added the debugger label Feb 5, 2017
@jasnell
Copy link
Member

jasnell commented Feb 6, 2017

@MylesBorins
Copy link
Contributor

@MylesBorins
Copy link
Contributor

landed in fa276ef...1c36e6d

@MylesBorins MylesBorins closed this Mar 8, 2017
@thefourtheye thefourtheye deleted the backport-debugger-test-fixes-v6.x branch March 13, 2017 08:45
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