mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 01:50:55 +00:00
move WaitForCacheSync to the sharedInformer package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
This commit is contained in:
@@ -170,7 +170,7 @@ func (e *EndpointController) Run(workers int, stopCh <-chan struct{}) {
|
||||
klog.Infof("Starting endpoint controller")
|
||||
defer klog.Infof("Shutting down endpoint controller")
|
||||
|
||||
if !controller.WaitForCacheSync("endpoint", stopCh, e.podsSynced, e.servicesSynced, e.endpointsSynced) {
|
||||
if !cache.WaitForNamedCacheSync("endpoint", stopCh, e.podsSynced, e.servicesSynced, e.endpointsSynced) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@@ -749,7 +749,7 @@ func TestWaitsForAllInformersToBeSynced2(t *testing.T) {
|
||||
defer close(stopCh)
|
||||
go endpoints.Run(1, stopCh)
|
||||
|
||||
// cache.WaitForCacheSync has a 100ms poll period, and the endpoints worker has a 10ms period.
|
||||
// cache.WaitForNamedCacheSync has a 100ms poll period, and the endpoints worker has a 10ms period.
|
||||
// To ensure we get all updates, including unexpected ones, we need to wait at least as long as
|
||||
// a single cache sync period and worker period, with some fudge room.
|
||||
time.Sleep(150 * time.Millisecond)
|
||||
|
Reference in New Issue
Block a user