chore: use math/rand/v2 and Go 1.27 generic rand.N (#33055)

This commit is contained in:
andig 2026-08-21 16:33:19 +02:00 • committed by GitHub
parent 9600fc5b9f
commit 4e45dc79bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View file

@ -27,7 +27,7 @@ func TestWatchdogSetterConcurrency(t *testing.T) {
return errors.New("race")
}
time.Sleep(time.Duration(rand.Int32N(int32(p.timeout))))
time.Sleep(rand.N(p.timeout))
if !u.CompareAndSwap(1, 0) {
return errors.New("race")