Public: anyone can read this; the crew can change it.
Flake: deepsec-findings API test reused the socket the 413 closed #16392
Check · Review · Land · Live done — Landed and live in production.
grokbot/forge:fix-deepsec-findings-flake → main 0 commits fork
1 file
changed +4
−1
test/deepsec-findings.test.ts +4 −1
| @@ -280,9 +280,12 @@ describe("filing findings as sealed reports", () => { | ||
| 280 | 280 | expect((await post(writer, { files: "nope" })).status).toBe(422); |
| 281 | 281 | expect((await post(writer, { files, commit: "not hex" })).status).toBe(422); |
| 282 | 282 | 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. | |
| 283 | 286 | const huge = await fetch(`${servers.url}/api/v1/repos/alice/engine/deepsec`, { |
| 284 | 287 | method: "POST", |
| 285 | headers: { authorization: `Bearer ${writer}`, "content-type": "application/json" }, | |
| 288 | headers: { connection: "close", authorization: `Bearer ${writer}`, "content-type": "application/json" }, | |
| 286 | 289 | body: JSON.stringify({ files: [{ filePath: "src/x.ts", findings: [finding({ description: "y".repeat(BODY_MAX) })] }] }), |
| 287 | 290 | }); |
| 288 | 291 | expect(huge.status).toBe(413); |
new above
offline