@@ -1104,33 +1104,37 @@ async def test_schedule_backfill(
11041104 state = ScheduleState (paused = True ),
11051105 ),
11061106 backfill = [
1107+ # 2 actions on Server >= 1.24, 1 action on Server < 1.24. Older
1108+ # servers backfill workflows in the interval [start_at, end_at), but
1109+ # newer servers backfill the interval [start_at, end_at].
11071110 ScheduleBackfill (
11081111 start_at = begin - timedelta (minutes = 30 ),
11091112 end_at = begin - timedelta (minutes = 29 ),
11101113 overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
11111114 )
11121115 ],
11131116 )
1114- # The number of items backfilled on a schedule boundary changed in 1.24, so
1115- # we check for either
1116- assert (await handle .describe ()).info .num_actions in [2 , 3 ]
1117+ # We accept both 1.24 and pre-1.24 action counts
1118+ assert (await handle .describe ()).info .num_actions in [1 , 2 ]
11171119
11181120 # Add two more backfills and and -2m will be deduped
11191121 await handle .backfill (
1122+ # 3 actions on Server >= 1.24, 2 actions on Server < 1.24
11201123 ScheduleBackfill (
11211124 start_at = begin - timedelta (minutes = 4 ),
11221125 end_at = begin - timedelta (minutes = 2 ),
11231126 overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
11241127 ),
1128+ # 3 actions on Server >= 1.24, 2 actions on Server < 1.24, except on
1129+ # Server >= 1.24, there is overlap with the prior backfill, so this is
1130+ # only net +2 actions, regardless of Server version.
11251131 ScheduleBackfill (
11261132 start_at = begin - timedelta (minutes = 2 ),
11271133 end_at = begin ,
11281134 overlap = ScheduleOverlapPolicy .ALLOW_ALL ,
11291135 ),
11301136 )
1131- # The number of items backfilled on a schedule boundary changed in 1.24, so
1132- # we check for either
1133- assert (await handle .describe ()).info .num_actions in [6 , 8 ]
1137+ assert (await handle .describe ()).info .num_actions in [5 , 7 ]
11341138
11351139 await handle .delete ()
11361140 await assert_no_schedules (client )
0 commit comments