test: harden scheduling review boundaries
This commit is contained in:
@@ -308,19 +308,23 @@ async def test_rpc_schedule_occurrences_tied_entries_traverse_once(tmp_path) ->
|
||||
)
|
||||
|
||||
seen: list[tuple[str, object]] = []
|
||||
cursor: object = None
|
||||
while True:
|
||||
cursor: str | None = None
|
||||
for _ in range(10):
|
||||
page = await client.list_schedule_occurrences(
|
||||
schedule_id="s",
|
||||
cursor=cursor,
|
||||
limit=1, # type: ignore[arg-type]
|
||||
limit=1,
|
||||
)
|
||||
assert page["total"] == 2
|
||||
for row in page["occurrences"]:
|
||||
seen.append((row["kind"], row["checkpoint_id"]))
|
||||
cursor = page["next_cursor"]
|
||||
if cursor is None:
|
||||
next_cursor = page["next_cursor"]
|
||||
if next_cursor is None:
|
||||
break
|
||||
assert next_cursor != cursor
|
||||
cursor = next_cursor
|
||||
else:
|
||||
pytest.fail("occurrence pagination did not terminate")
|
||||
assert seen == [("admitted", None), ("interrupted", "run-1.000001")]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user