


























@@ -5,7 +5,6 @@ import { access, mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promise
55import { tmpdir } from "node:os";
66import path from "node:path";
77import { pathToFileURL } from "node:url";
8-import { MAX_TIMER_TIMEOUT_MS } from "@openclaw/normalization-core/number-coercion";
98import { afterEach, describe, expect, it, vi } from "vitest";
109import { resolveWindowsTaskkillPath } from "../../scripts/lib/windows-taskkill.mjs";
1110import {
@@ -413,8 +412,8 @@ describe("resolve-openclaw-package-candidate", () => {
413412it("clamps oversized package runner command timers before scheduling", async () => {
414413await expect(
415414runCommandForTest(process.execPath, ["-e", "setTimeout(() => process.exit(0), 25);"], {
416-killAfterMs: MAX_TIMER_TIMEOUT_MS + 1,
417-timeoutMs: MAX_TIMER_TIMEOUT_MS + 1,
415+killAfterMs: Number.MAX_SAFE_INTEGER,
416+timeoutMs: Number.MAX_SAFE_INTEGER,
418417}),
419418).resolves.toBe("");
420419});
@@ -481,7 +480,7 @@ describe("resolve-openclaw-package-candidate", () => {
481480482481const timeoutAssertion = expect(
483482runCommandForTest(process.execPath, ["-e", childScript], {
484-killAfterMs: MAX_TIMER_TIMEOUT_MS + 1,
483+killAfterMs: Number.MAX_SAFE_INTEGER,
485484timeoutMs: 500,
486485}),
487486).rejects.toThrow(/timed out after 500ms/u);
@@ -1138,7 +1137,7 @@ describe("resolve-openclaw-package-candidate", () => {
11381137),
11391138lookupHost: lookupAddresses([{ address: "93.184.216.34", family: 4 }]),
11401139maxBytes: 3,
1141-timeoutMs: MAX_TIMER_TIMEOUT_MS + 1,
1140+timeoutMs: Number.MAX_SAFE_INTEGER,
11421141});
1143114211441143await expect(readFile(target)).resolves.toEqual(Buffer.from([1, 2, 3]));
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。