fix(test): clamp qa otel child timer · openclaw/openclaw@29eba5a
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -7,6 +7,7 @@ import os from "node:os";
|
7 | 7 | import path from "node:path"; |
8 | 8 | import { setTimeout as delay } from "node:timers/promises"; |
9 | 9 | import { gzipSync } from "node:zlib"; |
| 10 | +import { MAX_TIMER_TIMEOUT_MS } from "@openclaw/normalization-core/number-coercion"; |
10 | 11 | import { afterEach, beforeAll, describe, expect, it, vi } from "vitest"; |
11 | 12 | import { resolveWindowsTaskkillPath } from "../../../../scripts/lib/windows-taskkill.mjs"; |
12 | 13 | import { testing } from "./qa-otel-smoke-runtime.js"; |
@@ -662,6 +663,16 @@ describe("qa-otel-smoke receiver bounds", () => {
|
662 | 663 | } |
663 | 664 | }); |
664 | 665 | |
| 666 | +it("clamps oversized QA suite child timers before scheduling", async () => { |
| 667 | +const child = spawn( |
| 668 | +process.execPath, |
| 669 | +["--input-type=module", "--eval", "setTimeout(() => process.exit(0), 25);"], |
| 670 | +{ stdio: "ignore" }, |
| 671 | +); |
| 672 | + |
| 673 | +await expect(testing.waitForChild(child, MAX_TIMER_TIMEOUT_MS + 1, 100)).resolves.toBe(0); |
| 674 | +}); |
| 675 | + |
665 | 676 | it("uses taskkill for Windows QA suite timeout cleanup", () => { |
666 | 677 | const kill = vi.fn(); |
667 | 678 | const runTaskkill = vi.fn(() => ({ status: 0 })); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。