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 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 committed 2026-11-27 23:54:10 -08:00
1 parent efcee4a186
commit ad3050843c
1 file changed
+4 -2
@@ -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,