From c151f6bc1fce99e8106af94cefcec5d5a8ce6036 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Thu, 25 Jun 2015 12:11:01 +0200 Subject: [PATCH] Increase timeout for waiting for RC in load test --- test/e2e/load.go | 1 + test/e2e/util.go | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/test/e2e/load.go b/test/e2e/load.go index f34883a5b9a..67944a49927 100644 --- a/test/e2e/load.go +++ b/test/e2e/load.go @@ -157,6 +157,7 @@ func generateRCConfigsForGroup(c *client.Client, ns, groupName string, size, cou Client: c, Name: groupName + "-" + strconv.Itoa(i), Namespace: ns, + Timeout: 10 * time.Minute, Image: image, Replicas: size, } diff --git a/test/e2e/util.go b/test/e2e/util.go index e4adae320fa..eba9ceea4a0 100644 --- a/test/e2e/util.go +++ b/test/e2e/util.go @@ -157,6 +157,7 @@ type RCConfig struct { Name string Namespace string PollInterval time.Duration + Timeout time.Duration PodStatusFile *os.File Replicas int @@ -969,10 +970,14 @@ func RunRC(config RCConfig) error { if interval <= 0 { interval = 10 * time.Second } + timeout := config.Timeout + if timeout <= 0 { + timeout = 5 * time.Minute + } oldPods := make([]*api.Pod, 0) oldRunning := 0 lastChange := time.Now() - for oldRunning != config.Replicas && time.Since(lastChange) < 5*time.Minute { + for oldRunning != config.Replicas && time.Since(lastChange) < timeout { time.Sleep(interval) running := 0