Do not generate unnecessary goroutine

This commit is contained in:
Shintaro Murakami 2019-04-23 16:22:14 +09:00
parent 40f691a416
commit f8e81337da
5 changed files with 5 additions and 5 deletions

View File

@ -667,7 +667,7 @@ func (s *ProxyServer) Run() error {
// This has to start after the calls to NewServiceConfig and NewEndpointsConfig because those
// functions must configure their shared informer event handlers first.
go informerFactory.Start(wait.NeverStop)
informerFactory.Start(wait.NeverStop)
// Birth Cry after the birth is successful
s.birthCry()

View File

@ -127,7 +127,7 @@ func setupQuotaController(t *testing.T, kubeClient kubernetes.Interface, lister
t.Fatal(err)
}
stop := make(chan struct{})
go informerFactory.Start(stop)
informerFactory.Start(stop)
return quotaController{qc, stop}
}

View File

@ -1445,7 +1445,7 @@ func newTestWatchPlugin(t *testing.T, fakeClient *fakeclient.Clientset) (*csiPlu
factory := informers.NewSharedInformerFactory(fakeClient, csiResyncPeriod)
csiDriverInformer := factory.Storage().V1beta1().CSIDrivers()
csiDriverLister := csiDriverInformer.Lister()
go factory.Start(wait.NeverStop)
factory.Start(wait.NeverStop)
host := volumetest.NewFakeVolumeHostWithCSINodeName(
tmpDir,

View File

@ -122,7 +122,7 @@ func TestCSI_VolumeAll(t *testing.T) {
fakeWatcher := watch.NewRaceFreeFake()
factory := informers.NewSharedInformerFactory(client, csiResyncPeriod)
go factory.Start(wait.NeverStop)
factory.Start(wait.NeverStop)
host := volumetest.NewFakeVolumeHostWithCSINodeName(
tmpDir,

View File

@ -1034,7 +1034,7 @@ func (pm *VolumePluginMgr) Run(stopCh <-chan struct{}) {
// start informer for CSIDriver
if utilfeature.DefaultFeatureGate.Enabled(features.CSIDriverRegistry) {
informerFactory := kletHost.GetInformerFactory()
go informerFactory.Start(stopCh)
informerFactory.Start(stopCh)
}
}
}