Skip to content
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: fix flaky inspector-cli tests when breakpoints are restored #38431

Merged
merged 1 commit into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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