Merge pull request #34565 from timstclair/flake

Automatic merge from submit-queue

Fix race condition in test with git server startup

Fixes https://github.com/kubernetes/kubernetes/issues/32467 (hopefully)

Previously, the test didn't ensure the git server was running before attempting to connect to it.
This commit is contained in:
Kubernetes Submit Queue 2016-10-13 17:53:11 -07:00 committed by GitHub
commit 01189549f3

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