sftp: Limit concurrent backend operations

This commit is contained in:
Michael Eischer 2021-08-07 19:56:59 +02:00
parent cd783358d3
commit ece06f125e
6 changed files with 112 additions and 41 deletions

View file

@ -43,9 +43,10 @@ func TestLayout(t *testing.T) {
repo := filepath.Join(path, "repo")
be, err := sftp.Open(context.TODO(), sftp.Config{
Command: fmt.Sprintf("%q -e", sftpServer),
Path: repo,
Layout: test.layout,
Command: fmt.Sprintf("%q -e", sftpServer),
Path: repo,
Layout: test.layout,
Connections: 5,
})
if err != nil {
t.Fatal(err)