From fa185a21dba355e46e1ea087d2edc656708f8a80 Mon Sep 17 00:00:00 2001 From: Lan Liang Date: Mon, 18 Mar 2024 08:10:12 +0000 Subject: [PATCH] cleanup: delete rand.Seed(time.Now().UnixNano()) and using global number generator. see https://tip.golang.org/doc/go1.20 Signed-off-by: Lan Liang Kubernetes-commit: dc992adad385ab631e4a528ee6a342ea71e7a379 --- tools/cache/main_test.go | 3 --- tools/record/main_test.go | 3 --- util/workqueue/main_test.go | 3 --- 3 files changed, 9 deletions(-) diff --git a/tools/cache/main_test.go b/tools/cache/main_test.go index 16933a4b..abbfb0b5 100644 --- a/tools/cache/main_test.go +++ b/tools/cache/main_test.go @@ -17,13 +17,10 @@ limitations under the License. package cache import ( - "math/rand" "os" "testing" - "time" ) func TestMain(m *testing.M) { - rand.Seed(time.Now().UnixNano()) os.Exit(m.Run()) } diff --git a/tools/record/main_test.go b/tools/record/main_test.go index b3c74f25..58f81f74 100644 --- a/tools/record/main_test.go +++ b/tools/record/main_test.go @@ -17,13 +17,10 @@ limitations under the License. package record import ( - "math/rand" "os" "testing" - "time" ) func TestMain(m *testing.M) { - rand.Seed(time.Now().UnixNano()) os.Exit(m.Run()) } diff --git a/util/workqueue/main_test.go b/util/workqueue/main_test.go index 41274b2c..04d5817e 100644 --- a/util/workqueue/main_test.go +++ b/util/workqueue/main_test.go @@ -17,13 +17,10 @@ limitations under the License. package workqueue import ( - "math/rand" "os" "testing" - "time" ) func TestMain(m *testing.M) { - rand.Seed(time.Now().UnixNano()) os.Exit(m.Run()) }