test(ci): stabilize sandbox browser audit timeout · openclaw/openclaw@4efc48a
steipete
·
2026-05-30
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -5,6 +5,7 @@
|
5 | 5 | */ |
6 | 6 | import fs from "node:fs/promises"; |
7 | 7 | import path from "node:path"; |
| 8 | +import { clearTimeout as clearNodeTimeout, setTimeout as setNodeTimeout } from "node:timers"; |
8 | 9 | import { formatCliCommand } from "../cli/command-format.js"; |
9 | 10 | import { MANIFEST_KEY } from "../compat/legacy-names.js"; |
10 | 11 | import type { OpenClawConfig, ConfigFileSnapshot } from "../config/config.js"; |
@@ -300,10 +301,10 @@ async function withDockerProbeTimeout<T>(
|
300 | 301 | run: (signal: AbortSignal) => Promise<T>, |
301 | 302 | ): Promise<T> { |
302 | 303 | const controller = new AbortController(); |
303 | | -let timeout: NodeJS.Timeout | undefined; |
| 304 | +let timeout: ReturnType<typeof setNodeTimeout> | undefined; |
304 | 305 | let timedOut = false; |
305 | 306 | const timeoutPromise = new Promise<never>((_, reject) => { |
306 | | -timeout = setTimeout(() => { |
| 307 | +timeout = setNodeTimeout(() => { |
307 | 308 | timedOut = true; |
308 | 309 | controller.abort(); |
309 | 310 | reject(new DockerProbeTimeoutError(timeoutMs)); |
@@ -318,7 +319,7 @@ async function withDockerProbeTimeout<T>(
|
318 | 319 | throw err; |
319 | 320 | } finally { |
320 | 321 | if (timeout) { |
321 | | -clearTimeout(timeout); |
| 322 | +clearNodeTimeout(timeout); |
322 | 323 | } |
323 | 324 | } |
324 | 325 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。