(t *testing.T)
| 69 | } |
| 70 | |
| 71 | func TestBackOffRandomizedOverflow(t *testing.T) { |
| 72 | exp := NewExponentialBackOff() |
| 73 | exp.InitialInterval = math.MaxInt64 |
| 74 | exp.MaxInterval = math.MaxInt64 |
| 75 | exp.RandomizationFactor = 0.5 |
| 76 | exp.Reset() |
| 77 | |
| 78 | for range 100 { |
| 79 | if next := exp.NextBackOff(); next < 0 { |
| 80 | t.Fatalf("NextBackOff() = %d, want non-negative", next) |
| 81 | } |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | func assertEquals(t *testing.T, expected, value time.Duration) { |
| 86 | if expected != value { |
nothing calls this directly
no test coverage detected