Skip to content

Commit 217a40b

Browse files
committed
test: avoid flaky restart sync in debugger exceptions test
1 parent 6964b53 commit 217a40b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/parallel/test-debugger-exceptions.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ const path = require('path');
2727
await cli.waitFor(/disconnect/);
2828

2929
// Next run: With `breakOnException` it pauses in both places.
30-
await cli.stepCommand('r');
30+
// For `r`, sync on prompt instead of BREAK_MESSAGE to avoid flaky races.
31+
// https://github.com/nodejs/node/issues/61762
32+
await cli.command('r');
3133
await cli.waitForInitialBreak();
3234
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
3335
await cli.command('breakOnException');
@@ -38,15 +40,15 @@ const path = require('path');
3840

3941
// Next run: With `breakOnUncaught` it only pauses on the 2nd exception.
4042
await cli.command('breakOnUncaught');
41-
await cli.stepCommand('r'); // Also, the setting survives the restart.
43+
await cli.command('r'); // Also, the setting survives the restart.
4244
await cli.waitForInitialBreak();
4345
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
4446
await cli.stepCommand('c');
4547
assert.ok(cli.output.includes(`exception in ${script}:9`));
4648

4749
// Next run: Back to the initial state! It should die again.
4850
await cli.command('breakOnNone');
49-
await cli.stepCommand('r');
51+
await cli.command('r');
5052
await cli.waitForInitialBreak();
5153
assert.deepStrictEqual(cli.breakInfo, { filename: script, line: 1 });
5254
await cli.command('c');

0 commit comments

Comments
 (0)