Skip to content

Commit 0118954

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request kubernetes#34565 from timstclair/flake
Automatic merge from submit-queue Fix race condition in test with git server startup Fixes kubernetes#32467 (hopefully) Previously, the test didn't ensure the git server was running before attempting to connect to it.
2 parents 786cc3e + 3dddd34 commit 0118954

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

test/e2e/empty_dir_wrapper.go

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,7 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() {
120120
},
121121
},
122122
}
123-
124-
pod, err = f.Client.Pods(f.Namespace.Name).Create(pod)
125-
if err != nil {
126-
framework.Failf("unable to create pod %v: %v", pod.Name, err)
127-
}
128-
129-
err = f.WaitForPodRunning(pod.Name)
130-
Expect(err).NotTo(HaveOccurred(), "Failed waiting for pod %s to enter running state", pod.Name)
123+
pod = f.PodClient().CreateSync(pod)
131124

132125
defer func() {
133126
By("Cleaning up the secret")
@@ -139,8 +132,6 @@ var _ = framework.KubeDescribe("EmptyDir wrapper volumes", func() {
139132
framework.Failf("unable to delete git vol pod %v: %v", pod.Name, err)
140133
}
141134
}()
142-
143-
framework.ExpectNoError(framework.WaitForPodRunningInNamespace(f.Client, pod))
144135
})
145136

146137
// 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
204195
},
205196
},
206197
}
207-
208-
if gitServerPod, err = f.Client.Pods(f.Namespace.Name).Create(gitServerPod); err != nil {
209-
framework.Failf("unable to create test git server pod %s: %v", gitServerPod.Name, err)
210-
}
198+
f.PodClient().CreateSync(gitServerPod)
211199

212200
// Portal IP and port
213201
httpPort := 2345

0 commit comments

Comments
 (0)