mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
gofmt -r "WaitToWatch->WaitForWatchCompletion"
This commit is contained in:
parent
f13f1a5da6
commit
905c6dcb10
@ -446,7 +446,7 @@ func TestWatchControllers(t *testing.T) {
|
|||||||
|
|
||||||
go manager.watchControllers()
|
go manager.watchControllers()
|
||||||
|
|
||||||
fakeEtcd.WaitToWatch()
|
fakeEtcd.WaitForWatchCompletion()
|
||||||
|
|
||||||
// Test normal case
|
// Test normal case
|
||||||
testControllerSpec.ID = "foo"
|
testControllerSpec.ID = "foo"
|
||||||
@ -473,7 +473,7 @@ func TestWatchControllers(t *testing.T) {
|
|||||||
|
|
||||||
// Test purposeful shutdown
|
// Test purposeful shutdown
|
||||||
go manager.watchControllers()
|
go manager.watchControllers()
|
||||||
fakeEtcd.WaitToWatch()
|
fakeEtcd.WaitForWatchCompletion()
|
||||||
fakeEtcd.WatchStop <- true
|
fakeEtcd.WatchStop <- true
|
||||||
|
|
||||||
// Did everything shut down?
|
// Did everything shut down?
|
||||||
|
@ -105,7 +105,7 @@ func (f *FakeEtcdClient) Delete(key string, recursive bool) (*etcd.Response, err
|
|||||||
return &etcd.Response{}, f.Err
|
return &etcd.Response{}, f.Err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *FakeEtcdClient) WaitToWatch() {
|
func (f *FakeEtcdClient) WaitForWatchCompletion() {
|
||||||
f.condLock.Lock()
|
f.condLock.Lock()
|
||||||
defer f.condLock.Unlock()
|
defer f.condLock.Unlock()
|
||||||
f.condChannelsReady.Wait()
|
f.condChannelsReady.Wait()
|
||||||
|
Loading…
Reference in New Issue
Block a user