From 791ba26ec8f0639b9597ed8b7f689f47f6c81d27 Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Fri, 13 Dec 2024 09:30:47 +0100 Subject: [PATCH] test: fix flaky test --- tests/test_job_scheduler.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_job_scheduler.ts b/tests/test_job_scheduler.ts index 3e94a5dcbf..1b3781ae04 100644 --- a/tests/test_job_scheduler.ts +++ b/tests/test_job_scheduler.ts @@ -1710,11 +1710,12 @@ describe('Job Scheduler', function () { }); const repeatableJob = await queue.upsertJobScheduler('test', repeatOpts); - const delayedCount = await queue.getDelayedCount(); - expect(delayedCount).to.be.equal(1); await repeatableJob!.promote(); + const delayedCount = await queue.getDelayedCount(); + expect(delayedCount).to.be.equal(0); + this.clock.tick(177); await failing;