fix(e2e): fail fast when gateway exits before readiness · openclaw/openclaw@6a65cc5
steipete
·
2026-05-29
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -714,9 +714,14 @@ export async function waitForGatewayReady(child, port, logPath, options = {}) {
|
714 | 714 | const timeoutMs = Math.max(1, options.timeoutMs ?? READY_TIMEOUT_MS); |
715 | 715 | const pollDelayMs = Math.max(1, options.pollDelayMs ?? 250); |
716 | 716 | const logReportedReady = createGatewayReadyLogScanner(logPath); |
| 717 | +const exitedBeforeReadyError = () => |
| 718 | +new Error(`gateway exited before ready\n${tailFile(logPath)}`); |
| 719 | +if (hasChildExited(child)) { |
| 720 | +throw exitedBeforeReadyError(); |
| 721 | +} |
717 | 722 | while (Date.now() - started < timeoutMs) { |
718 | 723 | if (hasChildExited(child)) { |
719 | | -throw new Error(`gateway exited before ready\n${tailFile(logPath)}`); |
| 724 | +throw exitedBeforeReadyError(); |
720 | 725 | } |
721 | 726 | try { |
722 | 727 | const readyz = await fetchJson(`http://127.0.0.1:${port}/readyz`, { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。