Fix pacer tests

This commit is contained in:
Nick Craig-Wood 2016-02-26 16:59:52 +00:00
parent 867a26fe4f
commit e7b9cc4705

View File

@ -9,6 +9,8 @@ import (
) )
func TestNew(t *testing.T) { func TestNew(t *testing.T) {
const expectedRetries = 7
fs.Config.LowLevelRetries = expectedRetries
p := New() p := New()
if p.minSleep != 10*time.Millisecond { if p.minSleep != 10*time.Millisecond {
t.Errorf("minSleep") t.Errorf("minSleep")
@ -19,8 +21,8 @@ func TestNew(t *testing.T) {
if p.sleepTime != p.minSleep { if p.sleepTime != p.minSleep {
t.Errorf("sleepTime") t.Errorf("sleepTime")
} }
if p.retries != 10 { if p.retries != expectedRetries {
t.Errorf("retries") t.Errorf("retries want %v got %v", expectedRetries, p.retries)
} }
if p.decayConstant != 2 { if p.decayConstant != 2 {
t.Errorf("decayConstant") t.Errorf("decayConstant")