Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions tests/e2e/test_actor_request_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ async def main() -> None:
assert rq_2.name is None

if not was_rebooted:
await rq_1.add_request(Request(url='https://example.com/rq_1', unique_key='rq_1'))
await rq_2.add_request(Request(url='https://example.com/rq_2', unique_key='rq_2'))
# The platform's batch-add endpoint is best-effort: a single `add_request` can come back
# unprocessed (returns `None`) without retrying. Use `add_requests`, which retries unprocessed
# requests, so the reboot below never loses a request and the post-reboot fetch is reliable.
await rq_1.add_requests([Request(url='https://example.com/rq_1', unique_key='rq_1')])
await rq_2.add_requests([Request(url='https://example.com/rq_2', unique_key='rq_2')])
await Actor.set_value('was_rebooted', value=True)
await Actor.reboot()

Expand Down