mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -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", [
|
||||||
|
|||||||
@@ -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,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user