test: wait for the master to register the volume servers before failover tests run (#10871)

The failover harness treated an open volume server port as readiness, but the
master only learns of a volume server from its heartbeat. A lone master refuses
heartbeats until its bootstrap check elects it, and the servers back off and
retry, so registration lands seconds after the ports answer. Tests that started
writing in that window assigned against an empty topology, which fails with
"no free volumes left" and reaches the mount as ENOSPC.
This commit is contained in:
Chris Lu authored and GitHub committed 2026-08-21 23:05:14 -07:00
1 parent c0a9b110dd
commit 301d83cc7a
2 files changed
+60 -1

No files matched your search

+3 -1
View File
@@ -190,7 +190,9 @@ func TestReadWithVolumeServerDown(t *testing.T) {
t.Logf("read %s (held by volume%d) with volume%d down in %v", name, victim, victim, elapsed)
require.NoError(t, c.StartVolume(victim))
time.Sleep(3 * time.Second) // let the master see the heartbeat again
// The next iteration picks its victim from the master's placement view,
// so wait for the restarted server to be in it again.
require.NoError(t, c.WaitForVolumeServers(60*time.Second))
}
}