Merge pull request #123969 from liangyuanpeng/cleanup_rand

cleanup: delete rand.Seed(time.Now().UnixNano()) and using global number generator.

Kubernetes-commit: 7f67cb5960d8f93e6f005821d2c1b12dcde3dece
This commit is contained in:
Kubernetes Publisher 2024-04-18 02:10:26 -07:00
commit 9990b0b122
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())
}