fix broken retry tests

This commit is contained in:
Harshavardhana
2020-05-04 21:57:42 -07:00
parent b768645fde
commit 6c62b1a2ea
2 changed files with 22 additions and 15 deletions

View File

@@ -57,9 +57,11 @@ func TestRetryTimerWithNoJitter(t *testing.T) {
// Loop through the maximum possible attempt.
for i = range attemptCh {
if i == 30 {
cancel()
break
}
}
cancel()
_, ok := <-attemptCh
if ok {
t.Fatal("Attempt counter should be closed")