@@ -910,10 +910,7 @@ async def test_schedule_backfill(
910
910
pytest .skip ("Java test server doesn't support schedules" )
911
911
await assert_no_schedules (client )
912
912
913
- # Just in case it's on the minute boundary, move it off
914
- now = datetime .utcnow ()
915
- if now .second == 0 :
916
- now += timedelta (seconds = 1 )
913
+ begin = datetime (year = 2020 , month = 1 , day = 20 , hour = 5 )
917
914
918
915
# Create paused schedule that runs every minute and has two backfills
919
916
handle = await client .create_schedule (
@@ -934,8 +931,8 @@ async def test_schedule_backfill(
934
931
),
935
932
backfill = [
936
933
ScheduleBackfill (
937
- start_at = now - timedelta (minutes = 30 ),
938
- end_at = now - timedelta (minutes = 29 ),
934
+ start_at = begin - timedelta (minutes = 30 ),
935
+ end_at = begin - timedelta (minutes = 29 ),
939
936
overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
940
937
)
941
938
],
@@ -945,13 +942,13 @@ async def test_schedule_backfill(
945
942
# Add two more backfills and and -2m will be deduped
946
943
await handle .backfill (
947
944
ScheduleBackfill (
948
- start_at = now - timedelta (minutes = 4 ),
949
- end_at = now - timedelta (minutes = 2 ),
945
+ start_at = begin - timedelta (minutes = 4 ),
946
+ end_at = begin - timedelta (minutes = 2 ),
950
947
overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
951
948
),
952
949
ScheduleBackfill (
953
- start_at = now - timedelta (minutes = 2 ),
954
- end_at = now ,
950
+ start_at = begin - timedelta (minutes = 2 ),
951
+ end_at = begin ,
955
952
overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
956
953
),
957
954
)
0 commit comments