Run integration tests against the real BullMQ driver (#22551)

Migrate whole suite to real BullMQ

Shard times unchanged, still 5-6 min.
This commit is contained in:
neo773
2026-07-05 04:00:21 +05:30
committed by GitHub
parent 4e43a0fb4e
commit f14e62ec0c
10 changed files with 252 additions and 43 deletions
@@ -0,0 +1,25 @@
type ExpectEventuallyOptions = {
timeoutMs?: number;
intervalMs?: number;
};
export const expectEventually = async (
assertion: () => Promise<void> | void,
{ timeoutMs = 10_000, intervalMs = 100 }: ExpectEventuallyOptions = {},
): Promise<void> => {
const startedAt = Date.now();
for (;;) {
try {
await assertion();
return;
} catch (error) {
if (Date.now() - startedAt > timeoutMs) {
throw error;
}
await new Promise((resolve) => setTimeout(resolve, intervalMs));
}
}
};