fix cached history pagination and setup docs
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Матвей
2026-10-09 21:06:31 +03:00
parent 7cda433085
commit b538b2db39
4 changed files with 33 additions and 5 deletions
+16
View File
@@ -59,6 +59,22 @@ def main() -> None:
{message["id"] for message in history} == {first["id"], second["id"]},
"history cache returned stale data after write",
)
first_page_path = "/api/v1/chats/" + chat["id"] + "/messages?limit=1"
first_page = client.call(
"GET", first_page_path, actor=alice, schema="MessagePage"
)["json"]
cached_page = client.call(
"GET", first_page_path, actor=alice, schema="MessagePage"
)["json"]
check(first_page == cached_page, "cached page differs from the first response")
check(first_page["next_cursor"], "first page has no continuation cursor")
client.call(
"GET",
first_page_path + "&cursor=" + first_page["next_cursor"],
actor=alice,
schema="MessagePage",
)
print("PASS: registration race, chat rollback and cache read-after-write")