TestMaxSessionsSameConnection: make more reproducible

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2024-10-26 21:49:18 +02:00
parent 259986ed1d
commit e4e31ec4fb
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF

View file

@ -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 {