From ad3050843cbc5709f7305f95d2004b9beed11a3c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 27 Nov 2026 23:54:10 -0800 Subject: [PATCH] test(filer): wait for the fake master's volume location in the manifest reuse tests The master client marks a master current as soon as the stream opens and applies the first VolumeLocation afterwards, so GetLocations right after GetMaster can miss volume 1 on a loaded runner. Co-Authored-By: Claude Opus 5.5 --- weed/server/filer_grpc_server_reuse_manifest_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weed/server/filer_grpc_server_reuse_manifest_test.go b/weed/server/filer_grpc_server_reuse_manifest_test.go index 9fa5ceaa2e..628c1ae5af 100644 --- a/weed/server/filer_grpc_server_reuse_manifest_test.go +++ b/weed/server/filer_grpc_server_reuse_manifest_test.go @@ -126,8 +126,10 @@ func newReuseManifestServer(t *testing.T, store filer.FilerStore) (*FilerServer, waitCtx, cancelWait := context.WithTimeout(context.Background(), 5*time.Second) defer cancelWait() require.NotEmpty(t, f.MasterClient.GetMaster(waitCtx), "fake master did not become available") - _, found := f.MasterClient.GetLocations(1) - require.True(t, found, "volume 1 has no location") + require.Eventually(t, func() bool { + _, found := f.MasterClient.GetLocations(1) + return found + }, 5*time.Second, 10*time.Millisecond, "volume 1 has no location") return &FilerServer{ filer: f,