Skip to content

Commit 98992d3

Browse files
Merge pull request #29997 from neisw/trt-2197-test-order-fixed-seed
TRT-2197: use fixed seed for test ordering
2 parents e9beb50 + 21b639a commit 98992d3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pkg/test/ginkgo/cmd_runsuite.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"syscall"
1818
"time"
1919

20-
"github.com/onsi/ginkgo/v2"
2120
"github.com/openshift-eng/openshift-tests-extension/pkg/extension"
2221
configv1 "github.com/openshift/api/config/v1"
2322
"github.com/pkg/errors"
@@ -279,10 +278,13 @@ func (o *GinkgoRunSuiteOptions) Run(suite *TestSuite, clusterConfig *clusterdisc
279278
return errors.WithMessage(err, "could not convert test specs to origin test cases")
280279
}
281280

282-
// this ensures the tests are always run in random order to avoid
283-
// any intra-tests dependencies
284-
suiteConfig, _ := ginkgo.GinkgoConfiguration()
285-
r := rand.New(rand.NewSource(suiteConfig.RandomSeed))
281+
// TRT-2197 removing random seed for the time being
282+
// belief is it works against us in the short term
283+
// causing intermittent failures due to random test pairings.
284+
// Plan is to add a set of seeds and be able to attribute
285+
// the seed to individual jobs so compare results for
286+
// the same seed and search for failure patterns.
287+
r := rand.New(rand.NewSource(42))
286288
r.Shuffle(len(tests), func(i, j int) { tests[i], tests[j] = tests[j], tests[i] })
287289

288290
count := o.Count

0 commit comments

Comments
 (0)