mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 15:30:06 +08:00
lib/pacer: make tests more reliable
This commit is contained in:
parent
557edecd40
commit
1164eed2af
|
@ -343,7 +343,7 @@ func TestCallParallel(t *testing.T) {
|
||||||
assert.Equal(t, errFoo, p.CallNoRetry(dp.fn))
|
assert.Equal(t, errFoo, p.CallNoRetry(dp.fn))
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
time.Sleep(10 * time.Millisecond)
|
time.Sleep(250 * time.Millisecond)
|
||||||
called := 0
|
called := 0
|
||||||
wait.L.Lock()
|
wait.L.Lock()
|
||||||
for _, dp := range funcs {
|
for _, dp := range funcs {
|
||||||
|
@ -353,7 +353,7 @@ func TestCallParallel(t *testing.T) {
|
||||||
|
|
||||||
assert.Equal(t, 3, called)
|
assert.Equal(t, 3, called)
|
||||||
wait.Broadcast()
|
wait.Broadcast()
|
||||||
time.Sleep(20 * time.Millisecond)
|
time.Sleep(250 * time.Millisecond)
|
||||||
|
|
||||||
called = 0
|
called = 0
|
||||||
wait.L.Lock()
|
wait.L.Lock()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user