From 0c2d0072c4cd7a5ca0e6aa7d524ce6d36de307e7 Mon Sep 17 00:00:00 2001 From: Djordje Lukic Date: Mon, 2 May 2022 17:01:01 +0200 Subject: [PATCH] Sleep for 1.5 seconds before looking at the resize error This test is very flaky, the retry loop runs for 550ms and some more, 750ms is cleary not enough for everything to set and for the cli to return the tty resize error. A sleep of 1.5 seconds in this test should be enough for the retry loop to finish. Signed-off-by: Djordje Lukic --- cli/command/container/tty_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/container/tty_test.go b/cli/command/container/tty_test.go index 70552c9152..dc5a5a46de 100644 --- a/cli/command/container/tty_test.go +++ b/cli/command/container/tty_test.go @@ -25,6 +25,6 @@ func TestInitTtySizeErrors(t *testing.T) { ctx := context.Background() cli := test.NewFakeCli(&fakeClient{containerExecResizeFunc: fakeContainerExecResizeFunc}) initTtySize(ctx, cli, "8mm8nn8tt8bb", true, fakeResizeTtyFunc) - time.Sleep(750 * time.Millisecond) + time.Sleep(1500 * time.Millisecond) assert.Check(t, is.Equal(expectedError, cli.ErrBuffer().String())) }