Skip to content

Commit

Permalink
mrand2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazar955 committed Sep 20, 2024
1 parent cc3acd8 commit 42214b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions testutil/port.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package testutil

import (
"fmt"
"math/rand"
mrand "math/rand/v2"
"net"
"sync"
"testing"
Expand All @@ -18,7 +18,7 @@ var (
// by testing multiple random ports within a specified range.
func AllocateUniquePort(t *testing.T) int {
randPort := func(base, spread int) int {
return base + rand.Intn(spread)
return base + mrand.IntN(spread)
}

// Base port and spread range for port selection
Expand Down

0 comments on commit 42214b9

Please sign in to comment.