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 <gcslyp@gmail.com>

Kubernetes-commit: dc992adad385ab631e4a528ee6a342ea71e7a379
This commit is contained in:
Lan Liang 2024-03-18 08:10:12 +00:00 committed by Kubernetes Publisher
parent a82df61b84
commit fa185a21db
3 changed files with 0 additions and 9 deletions

View File

@ -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())
}

View File

@ -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())
}

View File

@ -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())
}