diff --git a/pkg/util/fake_etcd_client.go b/pkg/util/fake_etcd_client.go index 68eb2c09d59..c7f3160f06a 100644 --- a/pkg/util/fake_etcd_client.go +++ b/pkg/util/fake_etcd_client.go @@ -123,13 +123,6 @@ func (f *FakeEtcdClient) Watch(prefix string, waitIndex uint64, recursive bool, f.condWatchCompleted.Broadcast() f.condLock.Unlock() - // After calling this function, the WatchStop channel will not be ready - defer func() { - f.condLock.Lock() - f.condWatchCompleted = sync.NewCond(&f.condLock) - f.condLock.Unlock() - }() - select { case <-stop: return nil, etcd.ErrWatchStoppedByUser