From 0633fbbbbf55a45686c42f735f6ad2f9edbd560c Mon Sep 17 00:00:00 2001 From: Ricky Stewart Date: Wed, 15 Nov 2023 18:04:45 +0000 Subject: [PATCH] github-pull-request-make: pass timeout via `-test.timeout` The `-timeout` flag causes the test to be unceremoniously killed. Instead use `-test.timeout` via `--test_arg` which has better behavior (produces stacktraces, etc.) Epic: none Release note: None --- pkg/cmd/github-pull-request-make/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/github-pull-request-make/main.go b/pkg/cmd/github-pull-request-make/main.go index 1889a342f61f..7f0800e801a0 100644 --- a/pkg/cmd/github-pull-request-make/main.go +++ b/pkg/cmd/github-pull-request-make/main.go @@ -358,7 +358,8 @@ func main() { args = append(args, fmt.Sprintf("--test_timeout=%d", int((duration+1*time.Minute).Seconds()))) args = append(args, "--test_output", "streamed") - args = append(args, "--run_under", fmt.Sprintf("%s -bazel -shardable-artifacts 'XML_OUTPUT_FILE=%s merge-test-xmls' -stderr -maxfails 1 -maxtime %s -p %d -timeout %s", bazelStressTarget, bazciPath, duration, parallelism, timeout)) + args = append(args, "--run_under", fmt.Sprintf("%s -bazel -shardable-artifacts 'XML_OUTPUT_FILE=%s merge-test-xmls' -stderr -maxfails 1 -maxtime %s -p %d", bazelStressTarget, bazciPath, duration, parallelism)) + args = append(args, "--test_arg", "-test.timeout", "--test_arg", timeout.String()) cmd := exec.Command("bazci", args...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr