Repository navigation
Commit 5f2b169
authored
test: let the restarted silent-stream log end before stopping it (#1112)
`test_streamed_log_sync_stop_returns_on_silent_stream` restarts the log
and calls `stop()` right away. When `stop()` lands before the restarted
stream delivers its line, the thread falls back to reading the whole
log, which the test doesn't serve. The 500 then goes through the
client's retry backoff for longer than the 5 s `join`, and the final
`Log redirection stopped due to unexpected error` record shows up in the
`caplog` of a later test on the same xdist worker ([failed
run](https://github.com/apify/apify-client-python/actions/runs/37913292009/job/113763322520)).
The test now waits for the restarted thread to finish on its own (the
released server ends the stream after one line), asserts that it did,
and only then calls `stop()`. Running the two tests back to back failed
12/12 before the change and passes after it.
*✍️ Drafted by Claude Code*1 parent a370e7a commit 5f2b169
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1270 | 1270 | | |
1271 | 1271 | | |
1272 | 1272 | | |
1273 | | - | |
| 1273 | + | |
| 1274 | + | |
1274 | 1275 | | |
| 1276 | + | |
| 1277 | + | |
1275 | 1278 | | |
1276 | 1279 | | |
1277 | 1280 | | |
| |||
0 commit comments