From ca5298371583dc0f7541e0fc83ea042164186984 Mon Sep 17 00:00:00 2001 From: Moshe Atlow Date: Tue, 4 Apr 2023 15:20:13 +0300 Subject: [PATCH] test: fix flaky test-watch-mode-inspect --- test/sequential/test-watch-mode-inspect.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/sequential/test-watch-mode-inspect.mjs b/test/sequential/test-watch-mode-inspect.mjs index e403744bb07d9c..0b3605f0b45283 100644 --- a/test/sequential/test-watch-mode-inspect.mjs +++ b/test/sequential/test-watch-mode-inspect.mjs @@ -60,9 +60,10 @@ describe('watch mode - inspect', () => { // There should be a process per restart and one per parent process. // Message about Debugger should appear once per restart. + // On some systems restart can happen multiple times. const restarts = stdout.filter((line) => line === 'safe to debug now').length; - assert.strictEqual(stderr.match(/Debugger listening on ws:\/\//g).length, restarts); - assert.strictEqual(new Set(pids).size, restarts + 1); + assert.ok(stderr.match(/Debugger listening on ws:\/\//g).length > restarts); + assert.ok(new Set(pids).size > restarts + 1); }); it('should prevent attaching debugger with SIGUSR1 to outer process', { skip: common.isWindows }, async () => {