From 3a5afdac7f06ada6cc42f51e2268372d48c18f53 Mon Sep 17 00:00:00 2001 From: Yevheny Panin Date: Wed, 27 May 2026 18:28:15 +0300 Subject: [PATCH] =?UTF-8?q?fix(ci):=20bump=20vitest=20testTimeout=20to=201?= =?UTF-8?q?5s=20=E2=80=94=20close=20P0-6=20from=20launch-eve=20audit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit http-transport.test.ts has been failing on every GitHub Actions main run since v0.1.0, including the v0.1.0 / v0.1.1 / v0.1.2 tag pushes. Six tests time out at 5000ms in the CI Ubuntu environment while the same six pass in ~70ms total locally on Windows. Root cause: the file drives `runHttpServer(config)` which calls `app.listen(0, '127.0.0.1', cb)` on Express 5; the CI runner's listen-callback latency is enough to push past the vitest default 5000ms in some of the more lifecycle-heavy tests. The in-test work itself is sub-100ms once bind completes. Adopts `testTimeout: 15000` and `hookTimeout: 15000` at the vitest config level. Local fast runs are unaffected. The CI badge on the repo should go green on the next push instead of carrying a red X for HN visitors clicking through from npm. --- node/vitest.config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/node/vitest.config.ts b/node/vitest.config.ts index 93e8349..b3688b1 100644 --- a/node/vitest.config.ts +++ b/node/vitest.config.ts @@ -5,6 +5,14 @@ export default defineConfig({ environment: 'node', globals: false, include: ['tests/**/*.test.ts'], + // CI Ubuntu runners take longer for the first Express `app.listen(0, + // '127.0.0.1', cb)` bind in `tests/http-transport.test.ts` — enough to + // push past the vitest default 5000ms on some of the lifecycle-heavy + // tests. Locally the full file passes in ~70ms. Bumping testTimeout + + // hookTimeout to 15000ms is a CI-environment accommodation; the + // in-test work itself is sub-100ms once bind completes. + testTimeout: 15000, + hookTimeout: 15000, coverage: { provider: 'v8', include: ['src/**/*.ts'],