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, 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)
pod = f.PodClient().CreateSync(pod)
defer func() {
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.ExpectNoError(framework.WaitForPodRunningInNamespace(f.Client, pod))
})
// 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
},
},
}
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)
}
f.PodClient().CreateSync(gitServerPod)
// Portal IP and port
httpPort := 2345