Skip to content

Commit

Permalink
Fix tests for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
WillDaSilva committed May 2, 2024
1 parent 3b3c996 commit d0a827f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_datastores.py
@@ -1,5 +1,6 @@
from __future__ import annotations

import asyncio
import platform
from contextlib import AsyncExitStack, asynccontextmanager
from datetime import datetime, timedelta, timezone
Expand Down Expand Up @@ -712,6 +713,10 @@ async def test_resume_paused_schedules(

trigger = IntervalTrigger(hours=6.0)
schedule = Schedule(id="s1", task_id="task1", trigger=trigger, paused=True)

# Ensure the next fire time is not the same as the start time when using "now"
await asyncio.sleep(0.1)

schedule.next_fire_time = trigger.next()
await datastore.add_schedule(schedule, ConflictPolicy.exception)

Expand Down

0 comments on commit d0a827f

Please sign in to comment.