Repository navigation
Commit f44557c
authored
test: poll for task runs to fix flaky integration tests (#1123)
`test_task_runs` failed on master ([run
38285189656](https://github.com/apify/apify-client-python/actions/runs/38285189656/job/114931753660))
with `assert 0 >= 1`: the task's run list was empty right after `call()`
returned. The run listing is eventually consistent, so a read straight
after the run finishes can miss it. The JS client hit the same flake in
apify/apify-client-js#1136.
Both `test_task_runs` and `test_task_last_run` now poll with
`poll_until_condition` until the API returns the run that `call()`
started. `test_task_runs` also checks for that run's id instead of just
a non-empty page.
*✍️ Drafted by Claude Code*1 parent 20ace93 commit f44557c
1 file changed
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
293 | 295 | | |
294 | 296 | | |
295 | 297 | | |
| |||
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
325 | | - | |
| 327 | + | |
326 | 328 | | |
327 | | - | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
328 | 333 | | |
329 | 334 | | |
330 | 335 | | |
| |||
0 commit comments