From f6a3eddd2cbe6434c87cf1db04aaa56aac935e5c Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Mon, 29 Nov 2021 18:58:38 +0100 Subject: Don't initialize the global RNG with GinkgoRandomSeed() in e2e tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - It probably doesn't actually make a difference: in experiments, the github.com/containers/storage/pkg/stringid RNG initialization has been happening later - This makes the RNG caller-controlled (which we don't benefit from), but also the same on all nodes of multi-process Ginkgo execution. So, if it works at all, it may make collisions of random ID values more likely, and our tests are not robust against that. So don't go out of our way to make collisions more likely. Signed-off-by: Miloslav Trmač --- test/utils/utils.go | 4 ---- 1 file changed, 4 deletions(-) (limited to 'test') diff --git a/test/utils/utils.go b/test/utils/utils.go index a73bdb856..1f5067950 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -470,10 +470,6 @@ func Containerized() bool { return strings.Contains(string(b), "docker") } -func init() { - rand.Seed(GinkgoRandomSeed()) -} - var randomLetters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") // RandomString returns a string of given length composed of random characters -- cgit v1.2.3-54-g00ecf