test(cli): Remove clock race from flaky scheduled-task re-claim test (#36031)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Emilia 2026-08-11 11:48:57 +01:00 committed by GitHub
parent 6f2033f0e1
commit 729c9b46e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);