From 42214b90fad5b9304feb973d1ff2b34ccce86825 Mon Sep 17 00:00:00 2001 From: lazar Date: Fri, 20 Sep 2024 10:32:30 +0200 Subject: [PATCH] mrand2 --- testutil/port.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testutil/port.go b/testutil/port.go index b914e263..19ad7f76 100644 --- a/testutil/port.go +++ b/testutil/port.go @@ -2,7 +2,7 @@ package testutil import ( "fmt" - "math/rand" + mrand "math/rand/v2" "net" "sync" "testing" @@ -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