From 63f9d2f60e24effb909af1b1ecf6bb2431a23c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 5 Nov 2026 12:01:57 +0100 Subject: [PATCH] test(integration): let the server time out a statement before the test does A statement-level hang in the integration suite surfaced only as a 60-second test timeout, because statement_timeout sat at the same 60 s. At 45 s the server cancels first, and its error names the statement and the lock or wait it was stuck on. --- vitest.integration.config.mts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vitest.integration.config.mts b/vitest.integration.config.mts index ddb78f103..3800c505a 100644 --- a/vitest.integration.config.mts +++ b/vitest.integration.config.mts @@ -42,6 +42,11 @@ export default defineConfig({ // files that set it themselves (`account-deletion-grace.test.ts`, // `offhost-purge-on-deletion.test.ts`). ACCOUNT_DELETION_GRACE_DAYS: "0", + // Below `testTimeout`, so a statement that runs or waits too long is + // cancelled by the server, whose error names the statement and what it + // waited on. At the production default of 60 s the test timeout fired + // first and said only that the test took too long. + DATABASE_STATEMENT_TIMEOUT_MS: "45000", }, include: ["tests/integration/**/*.test.ts"], // Container boot + migration apply is slow; give each test a generous