From b40bdf190bbc860c6ef75b9d011112511fb1eaff Mon Sep 17 00:00:00 2001 From: Tomas Smetana Date: Mon, 9 Nov 2020 18:30:37 +0100 Subject: [PATCH] UPSTREAM: 96310: 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 6e80e620ce8ff..94a189f61557a 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 }) }) })