diff --git a/test/report/test-report-process-timeout-worker.js b/test/report/test-report-process-timeout-worker.js index a42e2513ccb..d7fe24a7a0d 100644 --- a/test/report/test-report-process-timeout-worker.js +++ b/test/report/test-report-process-timeout-worker.js @@ -31,6 +31,12 @@ for (let timeout = common.platformTimeout(1000); ; timeout *= 2) { marker, ], { cwd: tmpdir.path, encoding: 'utf8' }); + // If startup did not reach the blocked Worker, the watchdog may have + // interrupted report generation too. Retry before reading that report. + if (!fs.existsSync(marker) && timeout < common.platformTimeout(16000)) { + continue; + } + const reports = helper.findReports(child.pid, tmpdir.path); assert.strictEqual(reports.length, 1, child.stderr); helper.validate(reports[0], [