Skip to content

Commit 02351c9

Browse files
committed
Ensure execution order of suites is deterministic
Sort test suites alphabetically based on their json file names before execution.
1 parent d6bf3b0 commit 02351c9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/runner/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"io/fs"
88
"os"
9+
"sort"
910
"strings"
1011
"time"
1112

@@ -37,6 +38,9 @@ func main() {
3738
os.Exit(1)
3839
}
3940

41+
// Sort test files alphabetically for deterministic execution order
42+
sort.Strings(testFiles)
43+
4044
// Create test runner
4145
testRunner, err := runner.NewTestRunner(*handlerPath, *handlerTimeout, *timeout)
4246
if err != nil {

0 commit comments

Comments
 (0)