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

pull/6/head
Janet Kuo 2016-06-22 16:43:39 -07:00
parent b7ac841e7f
commit 7fd9a60617
1 changed files with 4 additions and 0 deletions

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())