test: fix flaky inspector-cli tests when breakpionts are restored

PR-URL: https://github.com/nodejs/node/pull/38431
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rich Trott authored and Richard Lau committed 2021-07-20 07:11:17 -04:00
1 parent 4d3a1fad28
commit 99fd8bfc6a
2 files changed
+5 -11

No files matched your search

+4 -1
View File
@@ -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() {
+1 -10
View File
@@ -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,