chore: fix potential panic in tests

This commit is contained in:
jamesread 2026-03-11 00:29:56 +00:00
parent 606b705bdd
commit cb3aa3362e
1 changed files with 3 additions and 3 deletions

View File

@ -640,12 +640,12 @@ func drainEventStreamUntilFinished(ch <-chan *apiv1.EventStreamResponse, timeout
deadline := time.Now().Add(timeout)
for time.Now().Before(deadline) {
ev, finished := recvEventStreamOne(ch, 50*time.Millisecond)
if finished {
return out
}
if ev != nil {
out = append(out, ev)
}
if finished {
return out
}
}
return out
}