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 <sgrunert@suse.com>
This commit is contained in:
Sascha Grunert 2020-05-12 12:23:28 +02:00
parent 8c366df5c6
commit e2cedb9469
No known key found for this signature in database
GPG Key ID: 8CE029DD1A866E52

View File

@ -100,9 +100,9 @@ func (c *criService) portForward(ctx context.Context, id string, port int32, str
return ctx.Err() return ctx.Err()
} }
// give a chance to terminate gracefully or timeout // 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 // https://linux.die.net/man/1/socat
timeout := time.Duration(500) * time.Millisecond const timeout = time.Second
select { select {
case e := <-errCh: case e := <-errCh:
if errFwd == nil { if errFwd == nil {