From 06333ca84e38fc387b50c411c6ea1f48bbe9ff5c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 6 Dec 2026 00:56:53 -0800 Subject: [PATCH] topology: reach the layout through GetVolumeLayout in the EC quarantine tests Co-Authored-By: Claude Opus 5.5 --- weed/topology/duplicate_volume_id_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/weed/topology/duplicate_volume_id_test.go b/weed/topology/duplicate_volume_id_test.go index cc581a98bc..b3efa0fe11 100644 --- a/weed/topology/duplicate_volume_id_test.go +++ b/weed/topology/duplicate_volume_id_test.go @@ -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")