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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
plugin: fix flaky scheduler lock test (#10432)
Chris Lucba2e5150c15
diff --git a/weed/admin/plugin/plugin_scheduler_test.go b/weed/admin/plugin/plugin_scheduler_test.goindex 371f6a0b0b..9b1d5e8104 100644--- a/weed/admin/plugin/plugin_scheduler_test.go+++ b/weed/admin/plugin/plugin_scheduler_test.go@@ -633,16 +633,19 @@ func TestRunLaneSchedulerIterationLockBehavior(t *testing.T) {t.Parallel()lm := &trackingLockManager{}- pluginSvc, err := New(Options{- LockManager: lm,- ClusterContextProvider: func(context.Context) (*plugin_pb.ClusterContext, error) {- return &plugin_pb.ClusterContext{}, nil- },- })+ // Construct without a cluster-context provider so the background+ // lane loops do not start: they call runLaneSchedulerIteration on+ // the same lane and would race this test's own manual call,+ // consuming the due job before it observes the lock. The provider+ // is set afterward so the manual iteration can still detect.+ pluginSvc, err := New(Options{LockManager: lm})if err != nil {t.Fatalf("New: %v", err)}defer pluginSvc.Shutdown()+ pluginSvc.clusterContextProvider = func(context.Context) (*plugin_pb.ClusterContext, error) {+ return &plugin_pb.ClusterContext{}, nil+ }// Register a detectable worker for the job type.pluginSvc.registry.UpsertFromHello(&plugin_pb.WorkerHello{