From e4e31ec4fb5b9ab0a350781741316c08d91bbb2b Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sat, 26 Oct 2024 21:49:18 +0200 Subject: [PATCH] TestMaxSessionsSameConnection: make more reproducible Signed-off-by: Nicola Murino --- internal/common/protocol_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/common/protocol_test.go b/internal/common/protocol_test.go index f82b28a7..20bab3c2 100644 --- a/internal/common/protocol_test.go +++ b/internal/common/protocol_test.go @@ -8188,11 +8188,12 @@ func TestMaxSessionsSameConnection(t *testing.T) { go func(counter int) { defer wg.Done() - time.Sleep(20 * time.Millisecond) var err error if counter < 2 { err = writeSFTPFile(fmt.Sprintf("%s_%d", testFileName, counter), 64*1024, client) } else { + // wait for the transfers to start + time.Sleep(50 * time.Millisecond) _, _, err = getSftpClient(user) } if err != nil {