Skip to content

Commit

Permalink
add timeout for go test
Browse files Browse the repository at this point in the history
Add a 2h timeout for `go test` when run on remote hosts.
  • Loading branch information
belimawr committed Nov 29, 2023
1 parent 9faef34 commit 856565c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ func (Integration) TestOnRemote(ctx context.Context) error {
extraFlags = append(extraFlags, goTestFlags...)
}
extraFlags = append(extraFlags, "-test.shuffle", "on",
"-test.timeout", "0", "-test.run", "^("+strings.Join(packageTests, "|")+")$")
"-test.timeout", "2h", "-test.run", "^("+strings.Join(packageTests, "|")+")$")
params := mage.GoTestArgs{
LogName: testName,
OutputFile: fileName + ".out",
Expand Down

0 comments on commit 856565c

Please sign in to comment.