From b38c216f22495a0091d3467a31ba33bcec53d0e7 Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Tue, 23 Jun 2026 14:40:07 +0200 Subject: [PATCH] test(workflows): raise beforeAll timeout for migration-heavy CRM suites The workflow/dunning suites boot the full core-migration set in beforeAll via bootCrmDb. In isolation that's ~1.3s, but under full-suite parallel load on a small CI runner it can exceed Jest's 5s default, timing out beforeAll and failing every test in the file (the CI flake). Match the existing pattern used by the other migration-heavy CRM suites (discountLineItems, incomingInvoiceRebill) and set jest.setTimeout(30000) on workflowEngine, workflowRoutes and invoiceDunning. --- backend/__tests__/integration/invoiceDunning.test.js | 5 +++++ backend/__tests__/integration/workflowEngine.test.js | 5 +++++ backend/__tests__/integration/workflowRoutes.test.js | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/backend/__tests__/integration/invoiceDunning.test.js b/backend/__tests__/integration/invoiceDunning.test.js index a1d54301..8b4194a3 100644 --- a/backend/__tests__/integration/invoiceDunning.test.js +++ b/backend/__tests__/integration/invoiceDunning.test.js @@ -10,6 +10,11 @@ */ const { bootCrmDb, seedMinimal } = require('./helpers/crmDb'); +// bootCrmDb runs the full core-migration set in beforeAll; under full-suite +// parallel load on a small CI runner that can exceed the 5s default. Match the +// other migration-heavy CRM suites (discountLineItems, incomingInvoiceRebill). +jest.setTimeout(30000); + let db; let cleanup; let invoiceService; diff --git a/backend/__tests__/integration/workflowEngine.test.js b/backend/__tests__/integration/workflowEngine.test.js index 22ff4a17..e57894e5 100644 --- a/backend/__tests__/integration/workflowEngine.test.js +++ b/backend/__tests__/integration/workflowEngine.test.js @@ -7,6 +7,11 @@ */ const { bootCrmDb } = require('./helpers/crmDb'); +// bootCrmDb runs the full core-migration set in beforeAll; under full-suite +// parallel load on a small CI runner that can exceed the 5s default. Match the +// other migration-heavy CRM suites (discountLineItems, incomingInvoiceRebill). +jest.setTimeout(30000); + let db; let cleanup; let engine; diff --git a/backend/__tests__/integration/workflowRoutes.test.js b/backend/__tests__/integration/workflowRoutes.test.js index e0b8024b..cda28f55 100644 --- a/backend/__tests__/integration/workflowRoutes.test.js +++ b/backend/__tests__/integration/workflowRoutes.test.js @@ -6,6 +6,11 @@ const { bootCrmDb, seedMinimal, assignAdminRole, mintAdminToken, buildRouteApp, } = require('./helpers/crmDb'); +// bootCrmDb runs the full core-migration set in beforeAll; under full-suite +// parallel load on a small CI runner that can exceed the 5s default. Match the +// other migration-heavy CRM suites (discountLineItems, incomingInvoiceRebill). +jest.setTimeout(30000); + let db; let cleanup; let app;