Skip to content

Commit

Permalink
UPSTREAM: 44760: Fix issue kubernetes#44757: Flaky Test_AttachDetachC…
Browse files Browse the repository at this point in the history
…ontrollerRecovery

:100644 100644 a1a2266d65... 08e1e1fc25... M	pkg/controller/volume/attachdetach/attach_detach_controller_test.go
  • Loading branch information
wongma7 authored and smarterclayton committed May 23, 2017
1 parent 6494cb2 commit c8d8c34
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
kcache "k8s.io/client-go/tools/cache"
"k8s.io/kubernetes/pkg/api/v1"
informers "k8s.io/kubernetes/pkg/client/informers/informers_generated/externalversions"
"k8s.io/kubernetes/pkg/controller"
Expand Down Expand Up @@ -168,6 +169,12 @@ func attachDetachRecoveryTestCase(t *testing.T, extraPods1 []*v1.Pod, extraPods2

informerFactory.Start(stopCh)

if !kcache.WaitForCacheSync(stopCh,
informerFactory.Core().V1().Pods().Informer().HasSynced,
informerFactory.Core().V1().Nodes().Informer().HasSynced) {
t.Fatalf("Error waiting for the informer caches to sync")
}

// Make sure the nodes and pods are in the inforer cache
i = 0
nodeList, err := informerFactory.Core().V1().Nodes().Lister().List(labels.Everything())
Expand Down

0 comments on commit c8d8c34

Please sign in to comment.