From 729c9b46e316dd5882130bccce7cb49fd2129291 Mon Sep 17 00:00:00 2001 From: Emilia <100027345+sovietspaceship@users.noreply.github.com> Date: Tue, 11 Aug 2026 11:48:57 +0100 Subject: [PATCH] test(cli): Remove clock race from flaky scheduled-task re-claim test (#36031) Co-authored-by: Claude Opus 5 --- .../cli/test/integration/scheduling/executor-repository.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/cli/test/integration/scheduling/executor-repository.test.ts b/packages/cli/test/integration/scheduling/executor-repository.test.ts index 6286aaea702..5a1cd3a41fb 100644 --- a/packages/cli/test/integration/scheduling/executor-repository.test.ts +++ b/packages/cli/test/integration/scheduling/executor-repository.test.ts @@ -461,6 +461,7 @@ describe('ScheduledTaskRepository executor methods', () => { it('bumps the epoch again on re-claim after a reschedule', async () => { const { id, epoch } = await claimOne(); await taskRepository.rescheduleTask({ host: HOST_A, id, claimedEpoch: epoch }, 0, 'retry'); + await taskRepository.update(id, { runAt: past() }); const [reclaimed] = await taskRepository.claimDueTasks(claimOpts({ host: HOST_B })); expect(reclaimed.id).toBe(id);