From 9abef6ec802fe1c8c9eaed397987ebcd1d3b582d Mon Sep 17 00:00:00 2001 From: Nikola Balic Date: Thu, 30 Jul 2026 12:47:33 +0200 Subject: [PATCH] fix(tests): give the Chromium imagegen suites room on CI Each imagegen render launches a fresh headless Chromium. The 30s budget holds locally, where the whole run.test.ts file finishes in under 2s, but on a loaded two-core CI runner a single launch has already blown past it and failed a run on main. Raise the three Chromium-backed suites to 120s, matching the budget the Next dev-server e2e suite already uses. The tests do not hang, they are just slow under contention, so the higher ceiling costs nothing on a healthy run. --- tests/imagegen/e2e/cli.test.ts | 5 +++-- tests/imagegen/integration/render.test.ts | 5 +++-- tests/imagegen/integration/run.test.ts | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/imagegen/e2e/cli.test.ts b/tests/imagegen/e2e/cli.test.ts index 41d14b26..017d03e6 100644 --- a/tests/imagegen/e2e/cli.test.ts +++ b/tests/imagegen/e2e/cli.test.ts @@ -8,8 +8,9 @@ import { join } from 'node:path'; import { fileURLToPath } from 'node:url'; import { PNG } from 'pngjs'; -// Each case renders a card in a subprocess, which exceeds the default 5s timeout. -setDefaultTimeout(30000); +// Each case renders a card in a subprocess, launching headless Chromium, which is +// slow enough on a loaded two-core CI runner to blow past a 30s budget. +setDefaultTimeout(120000); const CLI = fileURLToPath(new URL('../../../scripts/changelog/imagegen/cli.ts', import.meta.url)); diff --git a/tests/imagegen/integration/render.test.ts b/tests/imagegen/integration/render.test.ts index 36b97c1b..c4c5d7bd 100644 --- a/tests/imagegen/integration/render.test.ts +++ b/tests/imagegen/integration/render.test.ts @@ -4,8 +4,9 @@ import { beforeAll, describe, setDefaultTimeout, test } from 'bun:test'; import assert from 'node:assert/strict'; import { PNG } from 'pngjs'; -// The render hook launches headless Chromium, which can exceed the default 5s on CI. -setDefaultTimeout(30000); +// The render hook launches headless Chromium, which is slow enough on a loaded +// two-core CI runner to blow past a 30s budget. +setDefaultTimeout(120000); import { renderCard } from '../../../scripts/changelog/imagegen/render'; import { CARD_HEIGHT, CARD_WIDTH } from '../../../scripts/changelog/imagegen/template'; diff --git a/tests/imagegen/integration/run.test.ts b/tests/imagegen/integration/run.test.ts index af8c9ba0..d4ca096b 100644 --- a/tests/imagegen/integration/run.test.ts +++ b/tests/imagegen/integration/run.test.ts @@ -4,8 +4,9 @@ import { afterAll, beforeAll, describe, setDefaultTimeout, test } from 'bun:test import assert from 'node:assert/strict'; import { mkdtemp, readFile, rm } from 'node:fs/promises'; -// The pipeline renders with headless Chromium, which can exceed the default 5s on CI. -setDefaultTimeout(30000); +// The pipeline launches a fresh headless Chromium per render. On a loaded +// two-core CI runner one launch has taken over 30s, so allow generous headroom. +setDefaultTimeout(120000); import { tmpdir } from 'node:os'; import { join } from 'node:path';