Merge pull request #17107 from redwrasse/redwrasse/return-early-expectfun

testutils: return early instead of first breaking in LogObserver.Expe…
This commit is contained in:
Benjamin Wang
2023-12-15 09:53:40 +00:00
committed by GitHub

View File

@@ -79,13 +79,10 @@ func (logOb *LogObserver) ExpectFunc(ctx context.Context, filter func(string) bo
}
if len(res) >= count {
break
return res, nil
}
}
if len(res) >= count {
return res, nil
}
time.Sleep(10 * time.Millisecond)
}
}