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
16 lines
364 B
Go
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
|
|
}
|