diff --git a/test/e2e/network/service.go b/test/e2e/network/service.go index afe86d7005f..475e78d09f5 100644 --- a/test/e2e/network/service.go +++ b/test/e2e/network/service.go @@ -2754,7 +2754,7 @@ var _ = common.SIGDescribe("Services", func() { healthCheckNodePortAddr := net.JoinHostPort(nodeIPs[0], strconv.Itoa(int(svc.Spec.HealthCheckNodePort))) // validate that the health check node port from kube-proxy returns 200 when there are ready endpoints err = wait.PollImmediate(time.Second, time.Minute, func() (bool, error) { - cmd := fmt.Sprintf(`curl -s -o /dev/null -w "%%{http_code}" --connect-timeout 5 http://%s/healthz`, healthCheckNodePortAddr) + cmd := fmt.Sprintf(`curl -s -o /dev/null -w "%%{http_code}" --max-time 5 http://%s/healthz`, healthCheckNodePortAddr) out, err := e2eoutput.RunHostCmd(pausePod0.Namespace, pausePod0.Name, cmd) if err != nil { framework.Logf("unexpected error trying to connect to nodeport %d : %v", healthCheckNodePortAddr, err) @@ -2777,7 +2777,7 @@ var _ = common.SIGDescribe("Services", func() { // validate that the health check node port from kube-proxy returns 503 when there are no ready endpoints err = wait.PollImmediate(time.Second, time.Minute, func() (bool, error) { - cmd := fmt.Sprintf(`curl -s -o /dev/null -w "%%{http_code}" --connect-timeout 5 http://%s/healthz`, healthCheckNodePortAddr) + cmd := fmt.Sprintf(`curl -s -o /dev/null -w "%%{http_code}" --max-time 5 http://%s/healthz`, healthCheckNodePortAddr) out, err := e2eoutput.RunHostCmd(pausePod0.Namespace, pausePod0.Name, cmd) if err != nil { framework.Logf("unexpected error trying to connect to nodeport %d : %v", healthCheckNodePortAddr, err) diff --git a/test/e2e/network/util.go b/test/e2e/network/util.go index 489897a6eff..11c1bbe028f 100644 --- a/test/e2e/network/util.go +++ b/test/e2e/network/util.go @@ -158,7 +158,7 @@ func execHostnameTest(sourcePod v1.Pod, targetAddr, targetHostname string) { ) framework.Logf("Waiting up to %v to get response from %s", timeout, targetAddr) - cmd := fmt.Sprintf(`curl -q -s --connect-timeout 30 %s/hostname`, targetAddr) + cmd := fmt.Sprintf(`curl -q -s --max-time 30 %s/hostname`, targetAddr) for start := time.Now(); time.Since(start) < timeout; time.Sleep(2 * time.Second) { stdout, err = e2eoutput.RunHostCmd(sourcePod.Namespace, sourcePod.Name, cmd) if err != nil {