Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(watch-tool): deflake TestRetryWatcherToFinishWithUnreadEvents #94554

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions staging/src/k8s.io/client-go/tools/watch/retrywatcher_test.go
Expand Up @@ -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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this a whole second… this isn't a performance test

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

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
Expand Down