mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
topology: reach the layout through GetVolumeLayout in the EC quarantine tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0164ad8464
commit
06333ca84e
1 file changed
+3
-2
@@ -708,7 +708,8 @@ func TestEcEncodeSourceStaysReadOnlyUntilDeleted(t *testing.T) {
|
||||
topo.duplicateFlagChecks.Wait()
|
||||
require.False(t, topo.isQuarantined(dn1, v.Id), "the record goes with the source")
|
||||
require.Empty(t, recorder.to(dn1))
|
||||
require.Nil(t, topo.FindVolumeLayout("a", rp, needle.EMPTY_TTL, types.HardDriveType), "no regular copy is left to write to")
|
||||
_, found := topo.FindCollection("a")
|
||||
require.False(t, found, "no regular copy is left to write to")
|
||||
require.NotEmpty(t, topo.Lookup("a", v.Id), "lookups resolve to the shard holders")
|
||||
}
|
||||
|
||||
@@ -776,7 +777,7 @@ func TestQuarantineSurvivesServerMarkingItWritable(t *testing.T) {
|
||||
|
||||
// a vacuum's commit ends with the server telling the master the copy is
|
||||
// writable again, ahead of its next heartbeat
|
||||
vl := topo.FindVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, types.ToDiskType(v.DiskType))
|
||||
vl := topo.GetVolumeLayout(v.Collection, v.ReplicaPlacement, v.Ttl, types.ToDiskType(v.DiskType))
|
||||
topo.SetVolumeWritable(vl, dn1, v.Id)
|
||||
require.False(t, isWritable(t, topo, v), "the server's word must not lift the quarantine")
|
||||
|
||||
|
||||
Reference in new issue
Block a user