Backoff and Randomness additions for use in client utilities

Updated String to use int, and int not to panic, and panic to test panic
Format fixes.
This commit is contained in:
jay vyas
2015-11-05 09:02:51 -05:00
committed by jay vyas
parent 3a5e7d15f7
commit 7ffaef63d1
4 changed files with 50 additions and 11 deletions

View File

@@ -46,6 +46,14 @@ func TestSlowBackoff(t *testing.T) {
}
b.Next(id, tc.Now())
}
//Now confirm that the Reset cancels backoff.
b.Next(id, tc.Now())
b.Reset(id)
if b.Get(id) != 0 {
t.Errorf("Reset didn't clear the backoff.")
}
}
func TestBackoffReset(t *testing.T) {