diff --git a/test/e2e_node/e2e_node_suite_test.go b/test/e2e_node/e2e_node_suite_test.go index 7f58413ba5..3dfa15b0a8 100644 --- a/test/e2e_node/e2e_node_suite_test.go +++ b/test/e2e_node/e2e_node_suite_test.go @@ -74,6 +74,7 @@ func init() { } func TestMain(m *testing.M) { + rand.Seed(time.Now().UnixNano()) pflag.Parse() framework.AfterReadingAllFlags(&framework.TestContext) os.Exit(m.Run()) @@ -119,7 +120,6 @@ func TestE2eNode(t *testing.T) { return } // If run-services-mode is not specified, run test. - rand.Seed(time.Now().UnixNano()) RegisterFailHandler(Fail) reporters := []Reporter{} reportDir := framework.TestContext.ReportDir diff --git a/test/integration/volume/main_test.go b/test/integration/volume/main_test.go index f3c945d05c..710261d23c 100644 --- a/test/integration/volume/main_test.go +++ b/test/integration/volume/main_test.go @@ -17,11 +17,14 @@ limitations under the License. package volume import ( + "math/rand" "testing" + "time" "k8s.io/kubernetes/test/integration/framework" ) func TestMain(m *testing.M) { + rand.Seed(time.Now().UnixNano()) framework.EtcdMain(m.Run) } diff --git a/test/integration/volume/persistent_volumes_test.go b/test/integration/volume/persistent_volumes_test.go index 189af2bb50..57a49c75fa 100644 --- a/test/integration/volume/persistent_volumes_test.go +++ b/test/integration/volume/persistent_volumes_test.go @@ -256,7 +256,6 @@ func TestPersistentVolumeBindRace(t *testing.T) { glog.V(2).Infof("TestPersistentVolumeBindRace claims created") // putting a bind manually on a pv should only match the claim it is bound to - rand.Seed(time.Now().Unix()) claim := claims[rand.Intn(maxClaims-1)] claimRef, err := ref.GetReference(legacyscheme.Scheme, claim) if err != nil {