(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestRetryInterval(t *testing.T) { |
| 38 | testRetry(t, func(r *Request) { |
| 39 | r.SetRetryInterval(func(resp *Response, attempt int) time.Duration { |
| 40 | sleep := 0.01 * math.Exp2(float64(attempt)) |
| 41 | return time.Duration(math.Min(2, sleep)) * time.Second |
| 42 | }) |
| 43 | }) |
| 44 | } |
| 45 | |
| 46 | func TestRetryFixedInterval(t *testing.T) { |
| 47 | testRetry(t, func(r *Request) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…