From e2cedb9469c03fb78837e3783775633b426dc01a Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 12 May 2020 12:23:28 +0200 Subject: [PATCH] Increase port-forward timeout to 1s to fix e2e test We encountered two failing end-to-end tests after the adoption of https://github.com/containerd/cri/pull/1470 in https://github.com/cri-o/cri-o/pull/3749: ``` Summarizing 2 Failures: [Fail] [sig-cli] Kubectl Port forwarding With a server listening on 0.0.0.0 that expects a client request [It] should support a client that connects, sends DATA, and disconnects test/e2e/kubectl/portforward.go:343 [Fail] [sig-cli] Kubectl Port forwarding With a server listening on localhost that expects a client request [It] should support a client that connects , sends DATA, and disconnects test/e2e/kubectl/portforward.go:343 ``` Increasing the timeout to 1s fixes the issue. Signed-off-by: Sascha Grunert --- pkg/server/sandbox_portforward_unix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/server/sandbox_portforward_unix.go b/pkg/server/sandbox_portforward_unix.go index c5fadad2c..5691c2b61 100644 --- a/pkg/server/sandbox_portforward_unix.go +++ b/pkg/server/sandbox_portforward_unix.go @@ -100,9 +100,9 @@ func (c *criService) portForward(ctx context.Context, id string, port int32, str return ctx.Err() } // give a chance to terminate gracefully or timeout - // 0.5s is the default timeout used in socat + // after 1s // https://linux.die.net/man/1/socat - timeout := time.Duration(500) * time.Millisecond + const timeout = time.Second select { case e := <-errCh: if errFwd == nil {