test(scripts): stabilize tsdown process group timeout · openclaw/openclaw@4597178
vincentkoc
·
2026-06-20
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -651,6 +651,7 @@ describe("runTsdownBuildInvocation", () => {
|
651 | 651 | async () => { |
652 | 652 | const rootDir = createTempDir("openclaw-tsdown-timeout-"); |
653 | 653 | const childPidPath = path.join(rootDir, "child.pid"); |
| 654 | +const timeoutMs = 1_000; |
654 | 655 | let childPid = 0; |
655 | 656 | const childScript = "process.on('SIGTERM', () => {}); setInterval(() => {}, 1000);"; |
656 | 657 | const parentScript = [ |
@@ -680,12 +681,12 @@ describe("runTsdownBuildInvocation", () => {
|
680 | 681 | env: { |
681 | 682 | ...process.env, |
682 | 683 | OPENCLAW_TSDOWN_HEARTBEAT_MS: "0", |
683 | | -OPENCLAW_TSDOWN_TIMEOUT_MS: "50", |
| 684 | +OPENCLAW_TSDOWN_TIMEOUT_MS: String(timeoutMs), |
684 | 685 | }, |
685 | 686 | }, |
686 | 687 | ); |
687 | 688 | |
688 | | -await waitForFile(childPidPath, 2_000); |
| 689 | +await waitForFile(childPidPath, timeoutMs); |
689 | 690 | childPid = Number.parseInt(fs.readFileSync(childPidPath, "utf8"), 10); |
690 | 691 | expect(isProcessAlive(childPid)).toBe(true); |
691 | 692 | const result = await runPromise; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。