diff --git a/prog/kube-utils/main.go b/prog/kube-utils/main.go index 0743d360..c81156e6 100644 --- a/prog/kube-utils/main.go +++ b/prog/kube-utils/main.go @@ -354,6 +354,7 @@ func main() { ch := make(chan os.Signal) signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM) stopCh := make(chan struct{}) + rand.Seed(time.Now().UnixNano()) registerForNodeUpdates(c, stopCh, nodeName, peerName) <-ch close(stopCh) diff --git a/prog/kube-utils/peerlist_test.go b/prog/kube-utils/peerlist_test.go index 093c575b..c5e47fee 100644 --- a/prog/kube-utils/peerlist_test.go +++ b/prog/kube-utils/peerlist_test.go @@ -5,6 +5,7 @@ import ( "math/rand" "sync" "testing" + "time" "github.com/stretchr/testify/require" ) @@ -71,6 +72,7 @@ func doConcurrentIterations(iterations, concurrency int, f func(int)) { } func TestPeerListFuzz(t *testing.T) { + rand.Seed(time.Now().UnixNano()) const ( testIters = 1000 maxNodes = 100