mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: add 60s timeout to all HEIF integration tests for CI
HEIF decoding via heif-convert is slow on CI runners (~15-30s per image) and exceeds the default 30s Vitest timeout. Add explicit 60s timeouts to all 16 HEIF input tests across integration suite.
This commit is contained in:
@@ -520,24 +520,29 @@ describe("watermark-text", () => {
|
||||
|
||||
// ── HEIF input ───────────────────────────────────────────────────
|
||||
|
||||
it("handles HEIF input (motorcycle.heif)", async () => {
|
||||
const HEIF = readFileSync(join(FIXTURES, "content", "motorcycle.heif"));
|
||||
const { body, contentType } = createMultipartPayload([
|
||||
{ name: "file", filename: "photo.heif", contentType: "image/heif", content: HEIF },
|
||||
{ name: "settings", content: JSON.stringify({ text: "HEIF Test" }) },
|
||||
]);
|
||||
it(
|
||||
"handles HEIF input (motorcycle.heif)",
|
||||
{ timeout: 60_000 },
|
||||
async () => {
|
||||
const HEIF = readFileSync(join(FIXTURES, "content", "motorcycle.heif"));
|
||||
const { body, contentType } = createMultipartPayload([
|
||||
{ name: "file", filename: "photo.heif", contentType: "image/heif", content: HEIF },
|
||||
{ name: "settings", content: JSON.stringify({ text: "HEIF Test" }) },
|
||||
]);
|
||||
|
||||
const res = await app.inject({
|
||||
method: "POST",
|
||||
url: "/api/v1/tools/watermark-text",
|
||||
headers: { authorization: `Bearer ${adminToken}`, "content-type": contentType },
|
||||
body,
|
||||
});
|
||||
const res = await app.inject({
|
||||
method: "POST",
|
||||
url: "/api/v1/tools/watermark-text",
|
||||
headers: { authorization: `Bearer ${adminToken}`, "content-type": contentType },
|
||||
body,
|
||||
});
|
||||
|
||||
expect(res.statusCode).toBe(200);
|
||||
const json = JSON.parse(res.body);
|
||||
expect(json.downloadUrl).toBeDefined();
|
||||
}, 60_000);
|
||||
expect(res.statusCode).toBe(200);
|
||||
const json = JSON.parse(res.body);
|
||||
expect(json.downloadUrl).toBeDefined();
|
||||
},
|
||||
60_000,
|
||||
);
|
||||
|
||||
// ── Animated GIF input ──────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user