accounting: Allow transfers to be canceled with context #3257
This makes all transfers cancelable even if the backend doesn't support context as all transfers are done using the Accounting framework.
This commit is contained in:
parent
421585dd72
commit
122a47fba6
3 changed files with 27 additions and 6 deletions
|
@ -1040,8 +1040,6 @@ func TestSyncWithMaxDuration(t *testing.T) {
|
|||
startTime := time.Now()
|
||||
err := Sync(context.Background(), r.Fremote, r.Flocal, false)
|
||||
require.Equal(t, context.DeadlineExceeded, errors.Cause(err))
|
||||
err = accounting.GlobalStats().GetLastError()
|
||||
require.NoError(t, err)
|
||||
|
||||
elapsed := time.Since(startTime)
|
||||
maxTransferTime := (time.Duration(len(testFiles)) * 60 * time.Second) / time.Duration(bytesPerSecond)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue