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 <djordje.lukic@docker.com>
This commit is contained in:
Djordje Lukic 2022-05-02 17:01:01 +02:00
parent c76cbdc6a1
commit 0c2d0072c4
1 changed files with 1 additions and 1 deletions

View File

@ -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()))
}