Files
rclone/backend/zoho/pacer_test.go
T
Erol OzcanandNick Craig-Wood ef94788d5a zoho: add --zoho-tpslimit and --zoho-tpslimit-burst
Zoho throttling is account/plan-dependent; measurements show a
sustainable listing rate of ~6 requests/s on a production account -
going faster drains a token bucket and stalls ~2 minutes per
Retry-After, which is strictly slower overall. Add per-remote pacer
options (default 6/1) using the same token-bucket pacer as the Google
Drive backend. Set --zoho-tpslimit 0 to disable the cap.

See #9570
2026-07-05 12:28:52 +01:00

16 lines
364 B
Go

package zoho
import (
"testing"
"time"
"github.com/stretchr/testify/assert"
)
func TestTPSMinSleep(t *testing.T) {
// A transactions-per-second rate maps to 1s divided by that rate.
assert.Equal(t, time.Second, tpsMinSleep(1))
assert.Equal(t, 500*time.Millisecond, tpsMinSleep(2))
assert.Equal(t, time.Second/6, tpsMinSleep(6)) // the default of 6 tps
}