Skip to content

Commit 6fc90e4

Browse files
panvanodejs-github-bot
authored andcommitted
test: retry unready process timeout reports
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: nodejs/reliability#1687 Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #66722 Refs: nodejs/reliability#1686 Refs: nodejs/reliability#1690 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
1 parent 8d42625 commit 6fc90e4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎test/report/test-report-process-timeout-worker.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ for (let timeout = common.platformTimeout(1000); ; timeout *= 2) {
3131
marker,
3232
], { cwd: tmpdir.path, encoding: 'utf8' });
3333

34+
// If startup did not reach the blocked Worker, the watchdog may have
35+
// interrupted report generation too. Retry before reading that report.
36+
if (!fs.existsSync(marker) && timeout < common.platformTimeout(16000)) {
37+
continue;
38+
}
39+
3440
const reports = helper.findReports(child.pid, tmpdir.path);
3541
assert.strictEqual(reports.length, 1, child.stderr);
3642
helper.validate(reports[0], [

0 commit comments

Comments
 (0)