ensure no client is connected before running max connections test cases

This commit is contained in:
Nicola Murino
2021-05-11 08:04:57 +02:00
parent c8f7fc9bc9
commit b67cd0d3df
6 changed files with 56 additions and 2 deletions

View File

@@ -117,6 +117,8 @@ func TestBasicFTPHandlingCryptFs(t *testing.T) {
err = os.RemoveAll(user.GetHomeDir())
assert.NoError(t, err)
assert.Eventually(t, func() bool { return len(common.Connections.GetStats()) == 0 }, 1*time.Second, 50*time.Millisecond)
assert.Eventually(t, func() bool { return common.Connections.GetClientConnections() == 0 }, 1000*time.Millisecond,
50*time.Millisecond)
}
func TestZeroBytesTransfersCryptFs(t *testing.T) {