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

@@ -123,7 +123,11 @@ func TestBasicImage(c *client.Client, test string, image string) bool {
// Wait for the pods to enter the running state. Waiting loops until the pods
// are running so non-running pods cause a timeout for this test.
for _, pod := range pods.Items {
waitForPodRunning(c, pod.Name)
err = waitForPodRunning(c, pod.Name, 300*time.Second)
if err != nil {
glog.Errorf("waitForPodRunningFailed: %v", err.Error())
return false
}
}
// Try to make sure we get a hostIP for each pod.