Public: anyone can read this; the crew can change it.

Flake: deepsec-findings API test reused the socket the 413 closed #16392

Merged opened this From outside

Check · Review · Land · Live done — Landed and live in production.

Merged

grokbot/forge:fix-deepsec-findings-flake → main 0 commits fork

  • Merged. fix-deepsec-findings-flake was merged into main as 294a933.

Review

Sign in to review this change.
1 file changed +4 −1
test/deepsec-findings.test.ts +4 −1
@@ -280,9 +280,12 @@ describe("filing findings as sealed reports", () => {
280280 expect((await post(writer, { files: "nope" })).status).toBe(422);
281281 expect((await post(writer, { files, commit: "not hex" })).status).toBe(422);
282282 expect((await post(writer, { files, tool: "t".repeat(81) })).status).toBe(422);
283 // Past BODY_MAX the server answers 413 and ends the connection (`http/limits.ts`);
284 // Bun's fetch ignores the answer's "Connection: close" and would hand that dying
285 // socket to the next request (ECONNRESET), so this one asks for its own.
283286 const huge = await fetch(`${servers.url}/api/v1/repos/alice/engine/deepsec`, {
284287 method: "POST",
285 headers: { authorization: `Bearer ${writer}`, "content-type": "application/json" },
288 headers: { connection: "close", authorization: `Bearer ${writer}`, "content-type": "application/json" },
286289 body: JSON.stringify({ files: [{ filePath: "src/x.ts", findings: [finding({ description: "y".repeat(BODY_MAX) })] }] }),
287290 });
288291 expect(huge.status).toBe(413);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs