chore: fix potential panic in tests
This commit is contained in:
parent
606b705bdd
commit
cb3aa3362e
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue