Skip to content

Commit eebc897

Browse files
authored
Merge pull request kubernetes#126980 from dims/fix-for-GenericPersistentVolume-disruptive-test-failures
Fix for GenericPersistentVolume/Disruptive test failures
2 parents 4aca09b + 8dc84ed commit eebc897

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/e2e/storage/generic_persistent_volume-disruptive.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ func createPodPVCFromSC(ctx context.Context, f *framework.Framework, c clientset
109109
pvc, err = c.CoreV1().PersistentVolumeClaims(pvc.Namespace).Create(ctx, pvc, metav1.CreateOptions{})
110110
framework.ExpectNoError(err, "Error creating pvc")
111111
pvcClaims := []*v1.PersistentVolumeClaim{pvc}
112-
pvs, err := e2epv.WaitForPVClaimBoundPhase(ctx, c, pvcClaims, framework.ClaimProvisionTimeout)
113-
framework.ExpectNoError(err, "Failed waiting for PVC to be bound %v", err)
114-
gomega.Expect(pvs).To(gomega.HaveLen(1))
115112

116113
ginkgo.By("Creating a pod with dynamically provisioned volume")
117114
podConfig := e2epod.Config{
@@ -121,5 +118,11 @@ func createPodPVCFromSC(ctx context.Context, f *framework.Framework, c clientset
121118
}
122119
pod, err := e2epod.CreateSecPod(ctx, c, &podConfig, f.Timeouts.PodStart)
123120
framework.ExpectNoError(err, "While creating pods for kubelet restart test")
121+
122+
ginkgo.By("Checking for bound PVC")
123+
pvs, err := e2epv.WaitForPVClaimBoundPhase(ctx, c, pvcClaims, framework.ClaimProvisionTimeout)
124+
framework.ExpectNoError(err, "Failed waiting for PVC to be bound %v", err)
125+
gomega.Expect(pvs).To(gomega.HaveLen(1))
126+
124127
return pod, pvc, pvs[0]
125128
}

0 commit comments

Comments
 (0)