Merge pull request #27908 from janetkuo/wait-frontend-pods-running

Automatic merge from submit-queue

Wait for frontend pods Running before verifying its service in guestbook e2e test

Fixes #27334


[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
This commit is contained in:
k8s-merge-robot 2016-06-23 17:41:20 -07:00 committed by GitHub
commit 07c46fa194

View File

@ -1232,6 +1232,10 @@ func curl(url string) (string, error) {
}
func validateGuestbookApp(c *client.Client, ns string) {
framework.Logf("Waiting for all frontend pods to be Running.")
label := labels.SelectorFromSet(labels.Set(map[string]string{"tier": "frontend", "app": "guestbook"}))
err := framework.WaitForPodsWithLabelRunning(c, ns, label)
Expect(err).NotTo(HaveOccurred())
framework.Logf("Waiting for frontend to serve content.")
if !waitForGuestbookResponse(c, "get", "", `{"data": ""}`, guestbookStartupTimeout, ns) {
framework.Failf("Frontend service did not start serving content in %v seconds.", guestbookStartupTimeout.Seconds())