From 68b6a2ed082966cbd6285e71a87b56b043c102a7 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 13 Nov 2026 13:50:51 -0800 Subject: [PATCH] mount: model the refused async flush as a replaced file in recovery tests (#12628) A peer's chunk append now merges into the flush, so these tests no longer saw the refusal they exercise. A replaced file is still refused. Co-authored-by: Claude Opus 5.5 --- weed/mount/content_flush_recovery_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/mount/content_flush_recovery_test.go b/weed/mount/content_flush_recovery_test.go index c593dd8bdb..ca4f582401 100644 --- a/weed/mount/content_flush_recovery_test.go +++ b/weed/mount/content_flush_recovery_test.go @@ -40,7 +40,9 @@ func committedContentHandle(t *testing.T, peer bool) (*WFS, *FileHandle, *commit base.CommitTsNs = 100 current := proto.Clone(base).(*filer_pb.Entry) if peer { - current.Chunks = append(current.Chunks, flushConditionEntry(1, 2).Chunks[1]) + // A peer replaced the file: the flush cannot merge into it. + current = flushConditionEntry(4) + current.Attributes.Inode = 99 current.CommitTsNs = 101 } s := &committedContentFiler{contentFlushConditionFiler: contentFlushConditionFiler{entry: current}}