We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
math/rand/v2
math/rand
1 parent 34d5e39 commit aa5bd13Copy full SHA for aa5bd13
exponential.go
@@ -1,7 +1,7 @@
1
package backoff
2
3
import (
4
- "math/rand"
+ "math/rand/v2"
5
"time"
6
)
7
tries_test.go
@@ -4,14 +4,13 @@ package backoff
"errors"
8
"testing"
9
10
11
12
func TestMaxTriesHappy(t *testing.T) {
13
- r := rand.New(rand.NewSource(time.Now().UnixNano()))
14
- max := 17 + r.Intn(13)
+ max := 17 + rand.IntN(13)
15
bo := WithMaxRetries(&ZeroBackOff{}, uint64(max))
16
17
// Load up the tries count, but reset should clear the record
0 commit comments