@@ -1136,30 +1136,27 @@ async def test_schedule_backfill(
11361136 )
11371137 ],
11381138 )
1139- # We accept both 1.24 and pre-1.24 action counts
1140- assert (await handle .describe ()).info .num_actions in [1 , 2 ]
1141-
1142- # Add two more backfills and and -2m will be deduped
1143- await handle .backfill (
1144- # 3 actions on Server >= 1.24, 2 actions on Server < 1.24
1145- ScheduleBackfill (
1146- start_at = begin - timedelta (minutes = 4 ),
1147- end_at = begin - timedelta (minutes = 2 ),
1148- overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
1149- ),
1150- # 3 actions on Server >= 1.24, 2 actions on Server < 1.24, except on
1151- # Server >= 1.24, there is overlap with the prior backfill, so this is
1152- # only net +2 actions, regardless of Server version.
1153- ScheduleBackfill (
1154- start_at = begin - timedelta (minutes = 2 ),
1155- end_at = begin ,
1156- overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
1157- ),
1158- )
1159- assert (await handle .describe ()).info .num_actions in [5 , 7 ]
1160-
1161- await handle .delete ()
1162- await assert_no_schedules (client )
1139+ try :
1140+ # Add two more backfills. Older servers treat the end time as
1141+ # exclusive, 1.24+ servers treat it as inclusive, and 1.31+ servers no
1142+ # longer dedupe the overlapping ALLOW_ALL backfills below.
1143+ await handle .backfill (
1144+ # 3 actions on Server >= 1.24, 2 actions on Server < 1.24
1145+ ScheduleBackfill (
1146+ start_at = begin - timedelta (minutes = 4 ),
1147+ end_at = begin - timedelta (minutes = 2 ),
1148+ overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
1149+ ),
1150+ # 3 actions on Server >= 1.24, 2 actions on Server < 1.24.
1151+ ScheduleBackfill (
1152+ start_at = begin - timedelta (minutes = 2 ),
1153+ end_at = begin ,
1154+ overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
1155+ ),
1156+ )
1157+ finally :
1158+ await handle .delete ()
1159+ await assert_no_schedules (client )
11631160
11641161
11651162async def test_schedule_create_limited_actions_validation (
0 commit comments