Skip to content

Backport debugger test fixes v6.x - #11184

Closed
thefourtheye wants to merge 4 commits into
nodejs:v6.x-stagingfrom
thefourtheye:backport-debugger-test-fixes-v6.x
Closed

Backport debugger test fixes v6.x#11184
thefourtheye wants to merge 4 commits into
nodejs:v6.x-stagingfrom
thefourtheye:backport-debugger-test-fixes-v6.x

Conversation

@thefourtheye

Copy link
Copy Markdown
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 <cjihrig@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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 <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
`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 <jasnell@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
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 <rtrott@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
@nodejs-github-botnodejs-github-bot added test Issues and PRs related to the tests. v6.x labels Feb 5, 2017
@jasnell

Copy link
Copy Markdown
Member

@MylesBorins

Copy link
Copy Markdown
Contributor

@MylesBorins

Copy link
Copy Markdown
Contributor

landed in fa276ef...1c36e6d

@thefourtheye
thefourtheye deleted the backport-debugger-test-fixes-v6.x branch March 13, 2017 08:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@thefourtheye@jasnell@MylesBorins@mscdex@nodejs-github-bot