Skip to content

Commit 7c53005

Browse files
authored
Merge pull request kubernetes#128066 from bart0sh/PR160-e2e_nod-fix-mirror-pod-test
e2e_node: fix mirror pod test
2 parents 55b83c9 + 876819b commit 7c53005

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/e2e_node/mirror_pod_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ var _ = SIGDescribe("MirrorPod", func() {
233233
ginkgo.By("Stopping the NFS server")
234234
stopNfsServer(f, nfsServerPod)
235235

236-
ginkgo.By("Waiting for NFS server to stop...")
237-
time.Sleep(30 * time.Second)
238-
239236
ginkgo.By(fmt.Sprintf("Deleting the static nfs test pod: %s", staticPodName))
240237
err = deleteStaticPod(podPath, staticPodName, ns)
241238
framework.ExpectNoError(err)
@@ -303,7 +300,7 @@ func restartNfsServer(f *framework.Framework, serverPod *v1.Pod) {
303300
// pod's (only) container. This command changes the number of nfs server threads to 0,
304301
// thus closing all open nfs connections.
305302
func stopNfsServer(f *framework.Framework, serverPod *v1.Pod) {
306-
const stopcmd = "/usr/sbin/rpc.nfsd 0"
303+
const stopcmd = "rpc.nfsd 0 && for i in $(seq 200); do rpcinfo -p | grep -q nfs || break; sleep 1; done"
307304
_, _, err := e2evolume.PodExec(f, serverPod, stopcmd)
308305
framework.ExpectNoError(err)
309306
}

0 commit comments

Comments
 (0)