Skip to content

Commit 6d2b3f0

Browse files
Merge pull request #5 from wallester/chore/WA-20893-fix-tests-in-automation-2
2 parents 0d4462b + d20a8b8 commit 6d2b3f0

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

suite/suite.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,9 @@ func (suite *Suite) Run(name string, subtest func()) bool {
119119

120120
// Run takes a testing suite and runs all of the tests attached
121121
// to it.
122-
func Run(t *testing.T, suite TestingSuite, shuffleTests ...bool) {
122+
func Run(t *testing.T, suite TestingSuite) {
123123
defer recoverAndFailOnPanic(t)
124124

125-
var shuffle bool
126-
if len(shuffleTests) > 0 {
127-
shuffle = shuffleTests[0]
128-
}
129-
130125
suite.SetT(t)
131126
suite.SetS(suite)
132127

@@ -223,11 +218,9 @@ func Run(t *testing.T, suite TestingSuite, shuffleTests ...bool) {
223218
}()
224219
}
225220

226-
if shuffle {
227-
rand.Shuffle(len(tests), func(i, j int) {
228-
tests[i], tests[j] = tests[j], tests[i]
229-
})
230-
}
221+
rand.Shuffle(len(tests), func(i, j int) {
222+
tests[i], tests[j] = tests[j], tests[i]
223+
})
231224

232225
runTests(t, tests)
233226
}

0 commit comments

Comments
 (0)