-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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: refactor test-debugger-remote #10455
test: refactor test-debugger-remote #10455
Conversation
7e58a2b
to
9989b1a
Compare
assert.ok(expected == line, 'Got unexpected line: ' + line); | ||
}); | ||
const expected = '\bconnecting to localhost:5959 ... ok'; | ||
assert.strictEqual(expected, line, 'Got unexpected line: ' + line); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: expected
should be the second argument. Also I think the message can be dropped now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@targos Done!
9989b1a
to
99d9c91
Compare
99d9c91
to
99a7c16
Compare
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
99a7c16
to
a905e57
Compare
I improved the assertions so that problems in CI seen in #10456 will be resolved. |
Landed in 152bd82 |
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: #10361 PR-URL: #10455 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.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: #10361 PR-URL: #10455 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.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: #10361 PR-URL: #10455 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This test lands cleanly on v4 and v6 but fails on both. Please feel free to dig in / backport |
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>
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: #10361 PR-URL: #10455 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.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: #10361 PR-URL: #10455 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test
Description of change
The test doesn't attach an event listener for
exit
events andremoves them before killing. The intention is to fail the tests if
the processes exit normally. This patch attaches the
exit
eventhandlers.
Replace
var
s withlet
s andconst
s.Replace
==
based assertion withstrictEqual
assertion.Use
common.PORT
instead of5959
.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: #10361