From 96e5fea08efd393c0e76708efca3f2f04a022635 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 21 Apr 2026 23:27:10 -0700 Subject: [PATCH] test(catalog_spark): bound weed shell invocation with 30s timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit createTableBucket ran `weed shell` via exec.Command with no deadline. When the shell's first command retries on a transient master connection blip, the trailing `exit` on stdin never gets processed and the subprocess blocks until the outer 20m `go test` timeout fires — the surfacing symptom is a flaky 20m panic with no diagnostic output. Wrap the invocation in exec.CommandContext with a 30s timeout, matching the existing pattern in test/s3tables/catalog_risingwave/setup_test.go. --- test/s3tables/catalog_spark/setup_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/s3tables/catalog_spark/setup_test.go b/test/s3tables/catalog_spark/setup_test.go index 0c25b6828..affd92762 100644 --- a/test/s3tables/catalog_spark/setup_test.go +++ b/test/s3tables/catalog_spark/setup_test.go @@ -323,8 +323,11 @@ spark = (SparkSession.builder func createTableBucket(t *testing.T, env *TestEnvironment, bucketName string) { t.Helper() + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + masterGrpcPort := env.masterPort + 10000 - cmd := exec.Command("weed", "shell", + cmd := exec.CommandContext(ctx, "weed", "shell", fmt.Sprintf("-master=localhost:%d.%d", env.masterPort, masterGrpcPort), ) cmd.Stdin = strings.NewReader(fmt.Sprintf("s3tables.bucket -create -name %s -account 000000000000\nexit\n", bucketName))