From f2e6f879849f1d721b7e3146e6c16f0965ce8f98 Mon Sep 17 00:00:00 2001 From: yetone Date: Sat, 10 Oct 2026 22:50:21 +0800 Subject: [PATCH] zen-free: the CRLF event-limit test gets 60s, not bun's 5s The test sends a 32 MiB SSE event through guardToolResponse twice (64 MiB in all). On a loaded machine (load average ~110) it ran past bun's default 5s and failed, though it passes on an idle machine and on CI. The timeout now leaves room for load; the assertions are unchanged. Run: bun test in packages/zen-free (all pass). --- packages/zen-free/tool-response.test.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/zen-free/tool-response.test.mjs b/packages/zen-free/tool-response.test.mjs index 49b8712..f0b0499 100644 --- a/packages/zen-free/tool-response.test.mjs +++ b/packages/zen-free/tool-response.test.mjs @@ -864,7 +864,9 @@ test("chat: completed tool buffers release their cumulative budget", async () => assert.equal(tools, 34); }); -test("SSE event byte limit includes both bytes of CRLF even across chunks", async () => { +// 64 MiB through the guard: seconds of work, more under load, so it isn't +// held to bun's 5 s default (it timed out on a machine at load 110) +test("SSE event byte limit includes both bytes of CRLF even across chunks", { timeout: 60_000 }, async () => { const prefix = 'data: {"text":"'; const suffix = '"}\r\n\r\n'; const text = prefix + "x".repeat(32 * 1024 * 1024 + 1 - prefix.length - suffix.length) + suffix;