fix(e2e): clear streaming host command timers · openclaw/openclaw@aaceaf8
vincentkoc
·
2026-06-19
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1409,6 +1409,21 @@ setInterval(() => {}, 1000);
|
1409 | 1409 | } |
1410 | 1410 | }); |
1411 | 1411 | |
| 1412 | +it("clears streaming host command timers when spawn fails", async () => { |
| 1413 | +vi.useFakeTimers(); |
| 1414 | +try { |
| 1415 | +await expect( |
| 1416 | +runStreaming("openclaw-definitely-missing-host-command", [], { |
| 1417 | +quiet: true, |
| 1418 | +timeoutMs: 60 * 60 * 1000, |
| 1419 | +}), |
| 1420 | +).rejects.toMatchObject({ code: "ENOENT" }); |
| 1421 | +expect(vi.getTimerCount()).toBe(0); |
| 1422 | +} finally { |
| 1423 | +vi.useRealTimers(); |
| 1424 | +} |
| 1425 | +}); |
| 1426 | + |
1412 | 1427 | it("streams host command logs instead of retaining them in memory", async () => { |
1413 | 1428 | const source = readFileSync(TS_PATHS.hostCommand, "utf8"); |
1414 | 1429 | const runStreamingBlock = source.slice(source.indexOf("export async function runStreaming")); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。