mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: add 120s timeout to all HEIF/HEIC integration tests for CI
Comprehensively adds { timeout: 120_000 } to every HEIF/HEIC
integration test across 40 test files. HEIF decoding on CI runners
is significantly slower than local, causing sporadic timeouts at
the default 5s or previous 60s limits.
This commit is contained in:
@@ -146,21 +146,26 @@ describe("ocr", () => {
|
||||
expect([200, 501]).toContain(res.statusCode);
|
||||
}, 60_000);
|
||||
|
||||
it("handles HEIC input (200 or 501)", async () => {
|
||||
const { body, contentType } = createMultipartPayload([
|
||||
{ name: "file", filename: "photo.heic", contentType: "image/heic", content: HEIC },
|
||||
{ name: "settings", content: JSON.stringify({}) },
|
||||
]);
|
||||
it(
|
||||
"handles HEIC input (200 or 501)",
|
||||
{ timeout: 120_000 },
|
||||
async () => {
|
||||
const { body, contentType } = createMultipartPayload([
|
||||
{ name: "file", filename: "photo.heic", contentType: "image/heic", content: HEIC },
|
||||
{ name: "settings", content: JSON.stringify({}) },
|
||||
]);
|
||||
|
||||
const res = await app.inject({
|
||||
method: "POST",
|
||||
url: "/api/v1/tools/ocr",
|
||||
headers: { authorization: `Bearer ${adminToken}`, "content-type": contentType },
|
||||
body,
|
||||
});
|
||||
const res = await app.inject({
|
||||
method: "POST",
|
||||
url: "/api/v1/tools/ocr",
|
||||
headers: { authorization: `Bearer ${adminToken}`, "content-type": contentType },
|
||||
body,
|
||||
});
|
||||
|
||||
expect([200, 501]).toContain(res.statusCode);
|
||||
}, 60_000);
|
||||
expect([200, 501]).toContain(res.statusCode);
|
||||
},
|
||||
60_000,
|
||||
);
|
||||
|
||||
it("handles 1x1 pixel input (200, 422, or 501)", async () => {
|
||||
const { body, contentType } = createMultipartPayload([
|
||||
|
||||
Reference in New Issue
Block a user