mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-19 09:38:39 +00:00
test(watch-tool): deflake TestRetryWatcherToFinishWithUnreadEvents
Signed-off-by: knight42 <anonymousknight96@gmail.com> Kubernetes-commit: 1d92314f262548b6b24e309943274e0d9d196a41
This commit is contained in:
parent
62c82f5540
commit
a922620591
@ -587,11 +587,12 @@ func TestRetryWatcherToFinishWithUnreadEvents(t *testing.T) {
|
||||
|
||||
watcher.Stop()
|
||||
|
||||
maxTime := time.Second
|
||||
select {
|
||||
case <-watcher.Done():
|
||||
break
|
||||
case <-time.After(10 * time.Millisecond):
|
||||
t.Error("Failed to close the watcher")
|
||||
case <-time.After(maxTime):
|
||||
t.Errorf("The watcher failed to be closed in %s", maxTime)
|
||||
}
|
||||
|
||||
// RetryWatcher result channel should be closed
|
||||
|
Loading…
Reference in New Issue
Block a user