Skip to content

Commit 21bae50

Browse files
authored
Merge pull request #1426 from dolmen/testing-fix-use-of-math-rand
hooks/test: fix incorrect use of math/rand
2 parents 5d2cfcc + 857f924 commit 21bae50

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

hooks/test/test_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ func TestAllHooks(t *testing.T) {
4141

4242
func TestLoggingWithHooksRace(t *testing.T) {
4343

44-
rand.Seed(time.Now().Unix())
45-
unlocker := rand.Int() % 100
44+
r := rand.New(rand.NewSource(time.Now().UnixNano()))
45+
unlocker := r.Intn(100)
4646

4747
assert := assert.New(t)
4848
logger, hook := NewNullLogger()

0 commit comments

Comments
 (0)