mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
test(endpoints): deflake TestWatchHTTPTimeout
Signed-off-by: knight42 <anonymousknight96@gmail.com>
This commit is contained in:
parent
04362870ad
commit
50e8287e6d
@ -844,7 +844,16 @@ func TestWatchHTTPTimeout(t *testing.T) {
|
|||||||
close(timeoutCh)
|
close(timeoutCh)
|
||||||
select {
|
select {
|
||||||
case <-done:
|
case <-done:
|
||||||
if !watcher.IsStopped() {
|
eventCh := watcher.ResultChan()
|
||||||
|
select {
|
||||||
|
case _, opened := <-eventCh:
|
||||||
|
if opened {
|
||||||
|
t.Errorf("Watcher received unexpected event")
|
||||||
|
}
|
||||||
|
if !watcher.IsStopped() {
|
||||||
|
t.Errorf("Watcher is not stopped")
|
||||||
|
}
|
||||||
|
case <-time.After(wait.ForeverTestTimeout):
|
||||||
t.Errorf("Leaked watch on timeout")
|
t.Errorf("Leaked watch on timeout")
|
||||||
}
|
}
|
||||||
case <-time.After(wait.ForeverTestTimeout):
|
case <-time.After(wait.ForeverTestTimeout):
|
||||||
|
Loading…
Reference in New Issue
Block a user