e2e: deflake events

Handle streamCh channel being closed.
This commit is contained in:
Mahmood Ali
2021-01-20 12:41:07 -05:00
parent 8847de10c2
commit f045ec2d0b

View File

@@ -218,7 +218,10 @@ func (tc *EventsTest) TestStartIndex(f *framework.F) {
select {
case <-ctx.Done():
return
case event := <-streamCh:
case event, ok := <-streamCh:
if !ok {
return
}
if event.IsHeartbeat() {
continue
}