Add a timeout to waitForPodRunning

* Add a timeout, convert the function to return an error (which gives
a reasonable status message for callers).
* Start converting glog to By.
This commit is contained in:
Zach Loafman
2015-02-08 07:57:48 -08:00
parent c9c98ab19e
commit 2be3139926
5 changed files with 25 additions and 12 deletions

View File

@@ -80,7 +80,8 @@ var _ = Describe("Events", func() {
}()
By("waiting for the pod to start running")
waitForPodRunning(c, pod.Name)
err = waitForPodRunning(c, pod.Name, 300*time.Second)
Expect(err).NotTo(HaveOccurred())
By("verifying the pod is in kubernetes")
pods, err := podClient.List(labels.SelectorFromSet(labels.Set(map[string]string{"time": value})))