Fix race condition in test with git server startup

pull/6/head
Tim St. Clair 2016-10-11 12:35:09 -07:00
parent ead65fc25f
commit 3dddd34d3a
No known key found for this signature in database
GPG Key ID: 434D16BCEF479EAB
1 changed files with 2 additions and 14 deletions

View File

@ -120,14 +120,7 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() {
}, },
}, },
} }
pod = f.PodClient().CreateSync(pod)
pod, err = f.Client.Pods(f.Namespace.Name).Create(pod)
if err != nil {
framework.Failf("unable to create pod %v: %v", pod.Name, err)
}
err = f.WaitForPodRunning(pod.Name)
Expect(err).NotTo(HaveOccurred(), "Failed waiting for pod %s to enter running state", pod.Name)
defer func() { defer func() {
By("Cleaning up the secret") By("Cleaning up the secret")
@ -139,8 +132,6 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() {
framework.Failf("unable to delete git vol pod %v: %v", pod.Name, err) framework.Failf("unable to delete git vol pod %v: %v", pod.Name, err)
} }
}() }()
framework.ExpectNoError(framework.WaitForPodRunningInNamespace(f.Client, pod))
}) })
// The following two tests check for the problem fixed in #29641. // The following two tests check for the problem fixed in #29641.
@ -204,10 +195,7 @@ func createGitServer(f *framework.Framework) (gitURL string, gitRepo string, cle
}, },
}, },
} }
f.PodClient().CreateSync(gitServerPod)
if gitServerPod, err = f.Client.Pods(f.Namespace.Name).Create(gitServerPod); err != nil {
framework.Failf("unable to create test git server pod %s: %v", gitServerPod.Name, err)
}
// Portal IP and port // Portal IP and port
httpPort := 2345 httpPort := 2345