test: harden scheduling review boundaries

This commit is contained in:
lda
2026-09-10 02:17:27 +07:00 Verified
parent ed70223c1b
commit f8ed8e2192
10 changed files with 231 additions and 25 deletions
@@ -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")]