Commit 8cb4a8a
test: fix flaky test_large_batch_operations by adding retry on empty fetches
The test was flaky because fetch_next_request() can temporarily return None
due to eventual consistency in the Apify API, even when is_empty() reports
requests still exist. Replace the while-not-is_empty loop with a retry
pattern that tolerates up to 10 consecutive empty fetches before concluding
the queue is drained.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent cf36cc2 commit 8cb4a8a
1 file changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
| 551 | + | |
| 552 | + | |
552 | 553 | | |
| 554 | + | |
| 555 | + | |
553 | 556 | | |
554 | | - | |
| 557 | + | |
555 | 558 | | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
560 | 564 | | |
561 | 565 | | |
562 | 566 | | |
| |||
0 commit comments