fix(qa): force taskkill telegram credential trees on windows · openclaw/openclaw@c8b48c7
vincentkoc
·
2026-06-21
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -432,6 +432,30 @@ setInterval(() => {}, 1000);
|
432 | 432 | expect(child.kill).not.toHaveBeenCalled(); |
433 | 433 | }); |
434 | 434 | |
| 435 | +it("force-kills Windows credential helper process trees when graceful taskkill fails", () => { |
| 436 | +const child = { |
| 437 | +kill: vi.fn(), |
| 438 | +pid: 12345, |
| 439 | +}; |
| 440 | +const runTaskkill = vi |
| 441 | +.fn() |
| 442 | +.mockReturnValueOnce({ error: undefined, status: 1 }) |
| 443 | +.mockReturnValueOnce({ error: undefined, status: 0 }); |
| 444 | + |
| 445 | +signalChildProcessTree(child, "SIGTERM", { |
| 446 | +platform: "win32", |
| 447 | + runTaskkill, |
| 448 | +}); |
| 449 | + |
| 450 | +expect(runTaskkill).toHaveBeenNthCalledWith(1, "taskkill", ["/PID", "12345", "/T"], { |
| 451 | +stdio: "ignore", |
| 452 | +}); |
| 453 | +expect(runTaskkill).toHaveBeenNthCalledWith(2, "taskkill", ["/PID", "12345", "/T", "/F"], { |
| 454 | +stdio: "ignore", |
| 455 | +}); |
| 456 | +expect(child.kill).not.toHaveBeenCalled(); |
| 457 | +}); |
| 458 | + |
435 | 459 | it.runIf(process.platform !== "win32")( |
436 | 460 | "exits promptly after forwarded SIGTERM children exit cleanly", |
437 | 461 | async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。