diff --git a/pkg/storage/etcd/etcd_watcher_test.go b/pkg/storage/etcd/etcd_watcher_test.go index 49de7643ed9..65654bad60f 100644 --- a/pkg/storage/etcd/etcd_watcher_test.go +++ b/pkg/storage/etcd/etcd_watcher_test.go @@ -227,8 +227,8 @@ func TestWatchEtcdError(t *testing.T) { } server.Terminate(t) - got := <-watching.ResultChan() - if got.Type != watch.Error { + got, ok := <-watching.ResultChan() + if ok && got.Type != watch.Error { t.Fatalf("Unexpected non-error") } watching.Stop()