From 2f39614d27196917bd5633aec339237a264c313b Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Wed, 14 Oct 2026 11:37:36 +0200 Subject: [PATCH] test: retry unready process timeout reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Retry attempts that did not reach the blocked Worker before parsing their report. A timeout during startup can force exit before the report is complete. Keep the report and exit assertions once startup is ready. Refs: https://github.com/nodejs/reliability/issues/1687 Signed-off-by: Filip Skokan Assisted-by: Codex PR-URL: https://github.com/nodejs/node/pull/66722 Refs: https://github.com/nodejs/reliability/issues/1686 Refs: https://github.com/nodejs/reliability/issues/1690 Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Guilherme Araújo --- test/report/test-report-process-timeout-worker.js | 6 ++++++ 1 file changed, 6 insertions(+) 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], [