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).
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user