mirror of https://github.com/k3s-io/k3s
Fix race condition in test with git server startup
parent
ead65fc25f
commit
3dddd34d3a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue