mirror of
https://github.com/rclone/rclone.git
synced 2025-08-13 23:38:51 +02:00
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:
@ -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)
|
||||
|
Reference in New Issue
Block a user