fix: increase test timeouts for slow CI operations

- adversarial resize 50000x50000: 60s → 120s
- format-matrix HEIF tests: 30s (default) → 90s
This commit is contained in:
SnapOtter
2026-04-24 23:50:47 +08:00
parent c3e2b179b7
commit 598f75ef63
2 changed files with 77 additions and 71 deletions
+1 -1
View File
@@ -487,7 +487,7 @@ describe("Extreme dimension requests", () => {
// May succeed (Sharp allows large), fail at processing (422), or be // May succeed (Sharp allows large), fail at processing (422), or be
// rejected by validation (400). Must not crash. // rejected by validation (400). Must not crash.
expect([200, 400, 422]).toContain(res.statusCode); expect([200, 400, 422]).toContain(res.statusCode);
}, 60_000); }, 120_000);
it("rejects crop region larger than image dimensions", async () => { it("rejects crop region larger than image dimensions", async () => {
const res = await postTool("crop", [ const res = await postTool("crop", [
+8 -2
View File
@@ -349,7 +349,11 @@ describe("Cross-format matrix", () => {
// Skip "Convert to PNG" when input is already PNG (no-op conversion) // Skip "Convert to PNG" when input is already PNG (no-op conversion)
if (tool.id === "convert" && fmt.name === "PNG") continue; if (tool.id === "convert" && fmt.name === "PNG") continue;
it(`${tool.label}`, async () => { const perTestTimeout = fmt.needsHeifDecoder ? 90_000 : undefined;
it(
`${tool.label}`,
async () => {
if (!existsSync(fixturePath)) return; if (!existsSync(fixturePath)) return;
const buffer = readFileSync(fixturePath); const buffer = readFileSync(fixturePath);
@@ -424,7 +428,9 @@ describe("Cross-format matrix", () => {
expect(body.error).toBeDefined(); expect(body.error).toBeDefined();
expect(typeof body.error).toBe("string"); expect(typeof body.error).toBe("string");
} }
}); },
perTestTimeout,
);
} }
}); });
} }