testutils: return early instead of first breaking in LogObserver.ExpectFunc

Signed-off-by: redwrasse <mail@redwrasse.io>
This commit is contained in:
redwrasse 2023-12-12 22:19:53 -08:00
parent d298130eb0
commit 8a7596304a

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)
}
}