Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

test(catalog_spark): bound weed shell invocation with 30s timeout

Chris Lu96e5fea08efd
diff --git a/test/s3tables/catalog_spark/setup_test.go b/test/s3tables/catalog_spark/setup_test.go
index 0c25b6828e..affd927623 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))