Commit be578a2
fix(pipeline): resolve flaky TestBroadcaster_RetriesTransientError synctest deadlock (llm-d#593)
The test used synctest.Test but did not ensure all broadcaster goroutines
exited before the bubble closed. After cancel(), the fake client could
produce results faster than they were drained, filling the subscriber
channel buffer and blocking safeChannelSend — triggering a synctest
deadlock panic.
Fix: make the fake client context-aware so it stops producing results
after cancellation, and explicitly cancel + drain before returning.
Closes llm-d#592
Signed-off-by: Lior Aronovich <lioraronpr@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent ef6e111 commit be578a2
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
| |||
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
295 | | - | |
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
| |||
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
317 | 331 | | |
318 | 332 | | |
319 | 333 | | |
| |||
0 commit comments