We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4750523 + 50e8287 commit 8257639Copy full SHA for 8257639
staging/src/k8s.io/apiserver/pkg/endpoints/watch_test.go
@@ -844,7 +844,16 @@ func TestWatchHTTPTimeout(t *testing.T) {
844
close(timeoutCh)
845
select {
846
case <-done:
847
- if !watcher.IsStopped() {
+ eventCh := watcher.ResultChan()
848
+ select {
849
+ case _, opened := <-eventCh:
850
+ if opened {
851
+ t.Errorf("Watcher received unexpected event")
852
+ }
853
+ if !watcher.IsStopped() {
854
+ t.Errorf("Watcher is not stopped")
855
856
+ case <-time.After(wait.ForeverTestTimeout):
857
t.Errorf("Leaked watch on timeout")
858
}
859
case <-time.After(wait.ForeverTestTimeout):
0 commit comments