test(gateway): relax e2e node status waits · openclaw/openclaw@b25a0d0
vincentkoc
·
2026-05-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -20,8 +20,8 @@ export type ChatEventPayload = {
|
20 | 20 | |
21 | 21 | export type GatewayInstance = OpenClawTestInstance; |
22 | 22 | |
23 | | -const GATEWAY_CONNECT_STATUS_TIMEOUT_MS = 2_000; |
24 | | -const GATEWAY_NODE_STATUS_TIMEOUT_MS = 4_000; |
| 23 | +const GATEWAY_CONNECT_STATUS_TIMEOUT_MS = 10_000; |
| 24 | +const GATEWAY_NODE_STATUS_TIMEOUT_MS = 15_000; |
25 | 25 | const GATEWAY_NODE_STATUS_POLL_MS = 20; |
26 | 26 | |
27 | 27 | export async function spawnGatewayInstance(name: string): Promise<GatewayInstance> { |
@@ -151,7 +151,7 @@ async function connectStatusClient(
|
151 | 151 | }); |
152 | 152 | |
153 | 153 | timer = setTimeout(() => { |
154 | | -finish(new Error("timeout waiting for node.list")); |
| 154 | +finish(new Error(`timeout waiting for status client hello for ${inst.name}`)); |
155 | 155 | }, timeoutMs); |
156 | 156 | |
157 | 157 | client.start(); |
@@ -163,11 +163,11 @@ export async function waitForNodeStatus(
|
163 | 163 | nodeId: string, |
164 | 164 | timeoutMs = GATEWAY_NODE_STATUS_TIMEOUT_MS, |
165 | 165 | ) { |
166 | | -const deadline = Date.now() + timeoutMs; |
167 | 166 | const client = await connectStatusClient( |
168 | 167 | inst, |
169 | 168 | Math.min(GATEWAY_CONNECT_STATUS_TIMEOUT_MS, timeoutMs), |
170 | 169 | ); |
| 170 | +const deadline = Date.now() + timeoutMs; |
171 | 171 | try { |
172 | 172 | while (Date.now() < deadline) { |
173 | 173 | const list = await client.request("node.list", {}); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。