mirror of
https://github.com/drakkan/sftpgo.git
synced 2024-11-21 15:10:23 +00:00
TestMaxSessionsSameConnection: make more reproducible
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
259986ed1d
commit
e4e31ec4fb
1 changed files with 2 additions and 1 deletions
|
@ -8188,11 +8188,12 @@ func TestMaxSessionsSameConnection(t *testing.T) {
|
||||||
go func(counter int) {
|
go func(counter int) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
|
|
||||||
time.Sleep(20 * time.Millisecond)
|
|
||||||
var err error
|
var err error
|
||||||
if counter < 2 {
|
if counter < 2 {
|
||||||
err = writeSFTPFile(fmt.Sprintf("%s_%d", testFileName, counter), 64*1024, client)
|
err = writeSFTPFile(fmt.Sprintf("%s_%d", testFileName, counter), 64*1024, client)
|
||||||
} else {
|
} else {
|
||||||
|
// wait for the transfers to start
|
||||||
|
time.Sleep(50 * time.Millisecond)
|
||||||
_, _, err = getSftpClient(user)
|
_, _, err = getSftpClient(user)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue