Skip to content

Commit

Permalink
test: fix flaky inspector-cli tests when breakpionts are restored
Browse files Browse the repository at this point in the history
PR-URL: #38431
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Trott authored and targos committed May 17, 2021
1 parent f31a611 commit e64ebac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 4 additions & 1 deletion test/common/inspector-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ function startCLI(args, flags = [], spawnOpts = {}) {
if (this === child.stderr) {
stderrOutput += chunk;
}
outputBuffer.push(chunk);
// TODO(trott): Figure out why the "breakpoints restored." message appears
// in unpredictable places especially on AIX in CI. We shouldn't be
// excluding it, but it gets in the way of the output checking for tests.
outputBuffer.push(chunk.replace(/\n*\d+ breakpoints restored\.\n*/mg, ''));
}

function getOutput() {
Expand Down
11 changes: 1 addition & 10 deletions test/inspector-cli/test-inspector-cli-pid.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,7 @@ function launchTarget(...args) {
})
.then(() => cli.command('sb("alive.js", 3)'))
.then(() => cli.waitFor(/break/))
// TODO: There is a known issue on AIX and some other operating systems
// where the breakpoints aren't properly resolved yet when we reach this
// point. Eventually that should be figured out but for now we don't
// want to fail builds because of it.
// What it should be:
//
// .then(() => cli.waitForPrompt())
//
// What we're diong for now:
.then(() => cli.waitFor(/>\s+(?:\n1 breakpoints restored\.)?$/))
.then(() => cli.waitForPrompt())
.then(() => {
assert.match(
cli.output,
Expand Down

0 comments on commit e64ebac

Please sign in to comment.