From 99fd8bfc6a6c1aefefa679683ddacdddd38dec45 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 26 Apr 2021 21:16:38 -0700 Subject: [PATCH] test: fix flaky inspector-cli tests when breakpionts are restored PR-URL: https://github.com/nodejs/node/pull/38431 Reviewed-By: Gireesh Punathil Reviewed-By: Richard Lau Reviewed-By: James M Snell --- test/common/inspector-cli.js | 5 ++++- test/inspector-cli/test-inspector-cli-pid.js | 11 +---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/test/common/inspector-cli.js b/test/common/inspector-cli.js index 63d66ba3a8f2c0..8511d579c52bab 100644 --- a/test/common/inspector-cli.js +++ b/test/common/inspector-cli.js @@ -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() { diff --git a/test/inspector-cli/test-inspector-cli-pid.js b/test/inspector-cli/test-inspector-cli-pid.js index 92c81177650af3..c94ab52031111f 100644 --- a/test/inspector-cli/test-inspector-cli-pid.js +++ b/test/inspector-cli/test-inspector-cli-pid.js @@ -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,