From bc23dd9e816b7514c2281acb4b0ef995eb4e6df6 Mon Sep 17 00:00:00 2001 From: Tomas Smetana Date: Fri, 6 Nov 2020 16:38:11 +0100 Subject: [PATCH] PV e2e: fix race in NFS recycling test --- test/e2e/storage/persistent_volumes.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/e2e/storage/persistent_volumes.go b/test/e2e/storage/persistent_volumes.go index 6e80e620ce8..94a189f6155 100644 --- a/test/e2e/storage/persistent_volumes.go +++ b/test/e2e/storage/persistent_volumes.go @@ -307,6 +307,11 @@ var _ = utils.SIGDescribe("PersistentVolumes", func() { framework.ExpectNoError(e2epod.DeletePodWithWait(c, pod)) framework.Logf("Pod exited without failure; the volume has been recycled.") + + // Delete the PVC and wait for the recycler to finish before the NFS server gets shutdown during cleanup. + framework.Logf("Removing second PVC, waiting for the recycler to finish before cleanup.") + framework.ExpectNoError(e2epv.DeletePVCandValidatePV(c, ns, pvc, pv, v1.VolumeAvailable)) + pvc = nil }) }) })