mirror of
https://github.com/rclone/rclone.git
synced 2025-01-24 12:56:36 +02:00
pacer: attempt to fix occasional "beginSleep didn't fire" test failures
This commit is contained in:
parent
62540b4007
commit
77f344a69d
@ -212,7 +212,7 @@ func TestBeginCall(t *testing.T) {
|
||||
connTime := time.Now()
|
||||
p.connTokens <- struct{}{}
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
paceTime := waitForPace(p, 10*time.Millisecond)
|
||||
paceTime := waitForPace(p, 1000*time.Millisecond)
|
||||
if paceTime.IsZero() {
|
||||
t.Errorf("beginSleep didn't fire")
|
||||
} else if paceTime.Sub(startTime) < 0 {
|
||||
@ -232,7 +232,7 @@ func TestBeginCallZeroConnections(t *testing.T) {
|
||||
startTime := time.Now()
|
||||
p.pacer <- struct{}{}
|
||||
time.Sleep(1 * time.Millisecond)
|
||||
paceTime := waitForPace(p, 10*time.Millisecond)
|
||||
paceTime := waitForPace(p, 1000*time.Millisecond)
|
||||
if paceTime.IsZero() {
|
||||
t.Errorf("beginSleep didn't fire")
|
||||
} else if paceTime.Sub(startTime) < 0 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user