From 00a7fc320843e262bbba58094dd853a6dd7b20fb Mon Sep 17 00:00:00 2001 From: Yecheng Fu Date: Mon, 11 Feb 2019 11:55:32 +0800 Subject: [PATCH] Wait for first pod to termiante in local pv test local plugin will skip setting fsGroup if volume is mounted by other pods --- test/e2e/framework/volume_util.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/e2e/framework/volume_util.go b/test/e2e/framework/volume_util.go index 3687c22960..b87377ea70 100644 --- a/test/e2e/framework/volume_util.go +++ b/test/e2e/framework/volume_util.go @@ -537,6 +537,8 @@ func InjectHtml(client clientset.Interface, config VolumeTestConfig, volume v1.V defer func() { podClient.Delete(podName, nil) + err := waitForPodNotFoundInNamespace(client, podName, injectPod.Namespace, PodDeleteTimeout) + Expect(err).NotTo(HaveOccurred()) }() injectPod, err := podClient.Create(injectPod)