Merge pull request #94554 from knight42/fix/TestRetryWatcherToFinishWithUnreadEvents

test(watch-tool): deflake TestRetryWatcherToFinishWithUnreadEvents
This commit is contained in:
Kubernetes Prow Robot 2020-09-05 10:15:40 -07:00 committed by GitHub
commit 74053d555d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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