From 7fd9a60617b63219f1bbd14b021f8ee02463ab10 Mon Sep 17 00:00:00 2001 From: Janet Kuo Date: Wed, 22 Jun 2016 16:43:39 -0700 Subject: [PATCH] Wait for frontend pods Running before verifying its service in guestbook e2e test --- test/e2e/kubectl.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/e2e/kubectl.go b/test/e2e/kubectl.go index 754309fa4eb..73afbaae493 100644 --- a/test/e2e/kubectl.go +++ b/test/e2e/kubectl.go @@ -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())