Skip to content

Commit 22d4240

Browse files
author
OpenShift Bot
authored
Merge pull request #12631 from smarterclayton/timeout
Merged by openshift-bot
2 parents 08dd392 + 731bf45 commit 22d4240

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

test/extended/jobs/jobs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var _ = g.Describe("[job][Conformance] openshift can execute jobs", func() {
2929
o.Expect(err).NotTo(o.HaveOccurred())
3030

3131
g.By("waiting for a pod...")
32-
podNames, err := exeutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), exeutil.ParseLabelsOrDie(labels), exeutil.CheckPodIsSucceededFn, 1, 2*time.Minute)
32+
podNames, err := exeutil.WaitForPods(oc.KubeClient().Core().Pods(oc.Namespace()), exeutil.ParseLabelsOrDie(labels), exeutil.CheckPodIsSucceededFn, 1, 3*time.Minute)
3333
o.Expect(err).NotTo(o.HaveOccurred())
3434
o.Expect(len(podNames)).Should(o.Equal(1))
3535

test/extended/router/scoped.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import (
1717
exutil "github.com/openshift/origin/test/extended/util"
1818
)
1919

20+
const changeTimeoutSeconds = 3 * 60
21+
2022
var _ = g.Describe("[networking][router] openshift routers", func() {
2123
defer g.GinkgoRecover()
2224
var (
@@ -42,7 +44,7 @@ var _ = g.Describe("[networking][router] openshift routers", func() {
4244
g.By(fmt.Sprintf("creating a scoped router from a config file %q", configPath))
4345

4446
var routerIP string
45-
err := wait.Poll(time.Second, 2*time.Minute, func() (bool, error) {
47+
err := wait.Poll(time.Second, changeTimeoutSeconds*time.Second, func() (bool, error) {
4648
pod, err := oc.KubeFramework().ClientSet.Core().Pods(oc.KubeFramework().Namespace.Name).Get("scoped-router")
4749
if err != nil {
4850
return false, err
@@ -60,11 +62,11 @@ var _ = g.Describe("[networking][router] openshift routers", func() {
6062

6163
g.By("waiting for the healthz endpoint to respond")
6264
healthzURI := fmt.Sprintf("http://%s:1936/healthz", routerIP)
63-
err = waitForRouterOKResponseExec(ns, execPodName, healthzURI, routerIP, 60*2)
65+
err = waitForRouterOKResponseExec(ns, execPodName, healthzURI, routerIP, changeTimeoutSeconds)
6466
o.Expect(err).NotTo(o.HaveOccurred())
6567

6668
g.By("waiting for the valid route to respond")
67-
err = waitForRouterOKResponseExec(ns, execPodName, routerURL, "first.example.com", 60*2)
69+
err = waitForRouterOKResponseExec(ns, execPodName, routerURL, "first.example.com", changeTimeoutSeconds)
6870
o.Expect(err).NotTo(o.HaveOccurred())
6971

7072
for _, host := range []string{"second.example.com", "third.example.com"} {
@@ -83,7 +85,7 @@ var _ = g.Describe("[networking][router] openshift routers", func() {
8385
g.By(fmt.Sprintf("creating a scoped router from a config file %q", configPath))
8486

8587
var routerIP string
86-
err := wait.Poll(time.Second, 2*time.Minute, func() (bool, error) {
88+
err := wait.Poll(time.Second, changeTimeoutSeconds*time.Second, func() (bool, error) {
8789
pod, err := oc.KubeFramework().ClientSet.Core().Pods(ns).Get("router-override")
8890
if err != nil {
8991
return false, err
@@ -103,11 +105,11 @@ var _ = g.Describe("[networking][router] openshift routers", func() {
103105

104106
g.By("waiting for the healthz endpoint to respond")
105107
healthzURI := fmt.Sprintf("http://%s:1936/healthz", routerIP)
106-
err = waitForRouterOKResponseExec(ns, execPodName, healthzURI, routerIP, 60*2)
108+
err = waitForRouterOKResponseExec(ns, execPodName, healthzURI, routerIP, changeTimeoutSeconds)
107109
o.Expect(err).NotTo(o.HaveOccurred())
108110

109111
g.By("waiting for the valid route to respond")
110-
err = waitForRouterOKResponseExec(ns, execPodName, routerURL, fmt.Sprintf(pattern, "route-1", ns), 60*2)
112+
err = waitForRouterOKResponseExec(ns, execPodName, routerURL, fmt.Sprintf(pattern, "route-1", ns), changeTimeoutSeconds)
111113
o.Expect(err).NotTo(o.HaveOccurred())
112114

113115
g.By("checking that the stored domain name does not match a route")

test/extended/router/weighted.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var _ = g.Describe("[networking][router] weighted openshift router", func() {
4343
g.By(fmt.Sprintf("creating a weighted router from a config file %q", configPath))
4444

4545
var routerIP string
46-
err := wait.Poll(time.Second, 2*time.Minute, func() (bool, error) {
46+
err := wait.Poll(time.Second, changeTimeoutSeconds*time.Second, func() (bool, error) {
4747
pod, err := oc.KubeFramework().ClientSet.Core().Pods(oc.KubeFramework().Namespace.Name).Get("weighted-router")
4848
if err != nil {
4949
return false, err
@@ -62,22 +62,22 @@ var _ = g.Describe("[networking][router] weighted openshift router", func() {
6262

6363
g.By("waiting for the healthz endpoint to respond")
6464
healthzURI := fmt.Sprintf("http://%s:1936/healthz", routerIP)
65-
err = waitForRouterOKResponseExec(ns, execPodName, healthzURI, routerIP, 60*2)
65+
err = waitForRouterOKResponseExec(ns, execPodName, healthzURI, routerIP, changeTimeoutSeconds)
6666
o.Expect(err).NotTo(o.HaveOccurred())
6767

6868
host := "weighted.example.com"
6969
times := 100
7070
g.By(fmt.Sprintf("checking that %d requests go through successfully", times))
7171
// wait for the request to stabilize
72-
err = waitForRouterOKResponseExec(ns, execPodName, routerURL, "weighted.example.com", 60*2)
72+
err = waitForRouterOKResponseExec(ns, execPodName, routerURL, "weighted.example.com", changeTimeoutSeconds)
7373
o.Expect(err).NotTo(o.HaveOccurred())
7474
// all requests should now succeed
7575
err = expectRouteStatusCodeRepeatedExec(ns, execPodName, routerURL, "weighted.example.com", http.StatusOK, times)
7676
o.Expect(err).NotTo(o.HaveOccurred())
7777

7878
g.By(fmt.Sprintf("checking that there are two weighted backends in the router stats"))
7979
var trafficValues []string
80-
err = wait.PollImmediate(100*time.Millisecond, 2*time.Minute, func() (bool, error) {
80+
err = wait.PollImmediate(100*time.Millisecond, changeTimeoutSeconds*time.Second, func() (bool, error) {
8181
statsURL := fmt.Sprintf("http://%s:1936/;csv", routerIP)
8282
stats, err := getAuthenticatedRouteURLViaPod(ns, execPodName, statsURL, host, "admin", "password")
8383
o.Expect(err).NotTo(o.HaveOccurred())

0 commit comments

Comments
 (0)