Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 604456c

Browse filesBrowse files
inoway46aduh95
authored andcommitted
test: avoid flaky debugger restart waits
PR-URL: #61773 Refs: #61762 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 0a96a16 commit 604456c
Copy full SHA for 604456c

2 files changed

+6-2Lines changed: 6 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-debugger-restart-message.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-debugger-restart-message.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ const startCLI = require('../common/debugger');
2525
assert.strictEqual(cli.output.match(listeningRegExp).length, 1);
2626

2727
for (let i = 0; i < RESTARTS; i++) {
28-
await cli.stepCommand('restart');
28+
// For `restart`, sync on attach/prompt instead of BREAK_MESSAGE to avoid flaky races.
29+
// https://github.com/nodejs/node/issues/61762
30+
await cli.command('restart');
31+
await cli.waitFor(/Debugger attached\./);
32+
await cli.waitForPrompt();
2933
assert.strictEqual(cli.output.match(listeningRegExp).length, 1);
3034
}
3135
} finally {
Collapse file

‎test/parallel/test-debugger-run-after-quit-restart.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-debugger-run-after-quit-restart.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const path = require('path');
5757
{ filename: script, line: 2 },
5858
);
5959
})
60-
.then(() => cli.stepCommand('restart'))
60+
.then(() => cli.command('restart'))
6161
.then(() => cli.waitForInitialBreak())
6262
.then(() => {
6363
assert.deepStrictEqual(

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.