mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-21 09:57:52 +00:00
test: ensure WaitForCacheSync is called after starting sharedInformerFacotry
Signed-off-by: knight42 <anonymousknight96@gmail.com>
This commit is contained in:
@@ -31,7 +31,7 @@ import (
|
||||
"time"
|
||||
|
||||
apps "k8s.io/api/apps/v1"
|
||||
"k8s.io/api/core/v1"
|
||||
v1 "k8s.io/api/core/v1"
|
||||
apiequality "k8s.io/apimachinery/pkg/api/equality"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
@@ -599,6 +599,7 @@ func TestWatchControllers(t *testing.T) {
|
||||
BurstReplicas,
|
||||
)
|
||||
informers.Start(stopCh)
|
||||
informers.WaitForCacheSync(stopCh)
|
||||
|
||||
var testRSSpec apps.ReplicaSet
|
||||
received := make(chan string)
|
||||
@@ -1151,6 +1152,7 @@ func TestExpectationsOnRecreate(t *testing.T) {
|
||||
100,
|
||||
)
|
||||
f.Start(stopCh)
|
||||
f.WaitForCacheSync(stopCh)
|
||||
fakePodControl := controller.FakePodControl{}
|
||||
manager.podControl = &fakePodControl
|
||||
|
||||
|
Reference in New Issue
Block a user