Files
twenty/packages/twenty-server/test/integration/utils/setup-wait-for-all-jobs-between-tests.ts
T
neo773 f14e62ec0c Run integration tests against the real BullMQ driver (#22551)
Migrate whole suite to real BullMQ

Shard times unchanged, still 5-6 min.
2026-07-05 00:30:21 +02:00

20 lines
478 B
TypeScript

import {
closeQueueConnections,
waitForAllJobsToFinish,
} from 'test/integration/utils/wait-for-all-jobs-to-finish.util';
const WAIT_FOR_JOBS_HOOK_TIMEOUT_MS = 150_000;
beforeAll(async () => {
await waitForAllJobsToFinish();
}, WAIT_FOR_JOBS_HOOK_TIMEOUT_MS);
afterEach(async () => {
jest.useRealTimers();
await waitForAllJobsToFinish();
}, WAIT_FOR_JOBS_HOOK_TIMEOUT_MS);
afterAll(async () => {
await closeQueueConnections();
}, WAIT_FOR_JOBS_HOOK_TIMEOUT_MS);