Repository navigation
Commit bdc6769
authored
test: serve the whole-log fallback in the streamed log mocks (#1114)
Fixes a flaky
`test_actor_call_redirect_logs_to_default_logger_async[httpx2]` ([failed
run](https://github.com/apify/apify-client-python/actions/runs/38167530123/attempts/1)).
When `call()` finishes before the log stream delivers its first chunk,
`StreamedLog` reads the whole log with `GET /log?raw=true` (added in
#1084). The `mock_api` and `mock_api_failing_status_poll` fixtures
didn't serve that endpoint. In
`test_actor_call_returns_run_when_status_poll_fails_sync`, the sync
thread then retried the 500 with backoff, outlived the 5 s join in
`stop()`, and logged its error into the next test's `caplog` on the same
xdist worker.
Both fixtures now serve the whole log on that endpoint. Locally the
failure went from 2/10 to 0/40 with the two tests in CI order, and
`test_logging.py` under `-n auto` passed 30/30.
*✍️ Drafted by Claude Code*1 parent 5ab509e commit bdc6769
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| |||
1137 | 1141 | | |
1138 | 1142 | | |
1139 | 1143 | | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1140 | 1147 | | |
1141 | 1148 | | |
1142 | 1149 | | |
| |||
0 commit comments