From 83974e4940db6d190e760e02f36daa6d4f16fdff Mon Sep 17 00:00:00 2001 From: hxie Date: Mon, 7 Feb 2022 00:37:58 -0800 Subject: [PATCH] Remove option 'T' from wget on Windows Command 'wget' in Windows image agnhost does not support option timeout, this test fails: - should be able to up and down services --- test/e2e/network/service.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/e2e/network/service.go b/test/e2e/network/service.go index 699f9e33686..01874097685 100644 --- a/test/e2e/network/service.go +++ b/test/e2e/network/service.go @@ -328,7 +328,11 @@ func verifyServeHostnameServiceUp(c clientset.Interface, ns string, expectedPods // verify service from pod cmdFunc := func(podName string) string { - wgetCmd := "wget -q -T 1 -O -" + wgetCmd := "wget -q -O -" + // Command 'wget' in Windows image may not support option 'T' + if !framework.NodeOSDistroIs("windows") { + wgetCmd += " -T 1" + } serviceIPPort := net.JoinHostPort(serviceIP, strconv.Itoa(servicePort)) cmd := fmt.Sprintf("for i in $(seq 1 %d); do %s http://%s 2>&1 || true; echo; done", 50*len(expectedPods), wgetCmd, serviceIPPort)