mirror of
https://github.com/nodejs/node.git
synced 2026-10-28 10:15:07 +08:00
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: https://github.com/nodejs/reliability/issues/1687 Signed-off-by: Filip Skokan <panva.ip@gmail.com> 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 <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>
This commit is contained in:
1 parent
8d4262525d
commit
6fc90e4427
1 file changed
+6
@@ -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], [
|
||||
|
||||
Reference in new issue
Block a user