diff --git a/seaweed-block/core/storage/chunk_cut_cow_fill_test.go b/seaweed-block/core/storage/chunk_cut_cow_fill_test.go index 4beadda9e9..8162a59095 100644 --- a/seaweed-block/core/storage/chunk_cut_cow_fill_test.go +++ b/seaweed-block/core/storage/chunk_cut_cow_fill_test.go @@ -51,7 +51,12 @@ func TestCutCOWV3_HeldFillIsCancelledByAbortAndDrained(t *testing.T) { if w == nil { t.Fatal("missing active window") } + w.mu.Lock() // the copier adds entries under the window's lock e := w.entries[2] + w.mu.Unlock() + if e == nil { + t.Fatal("no window entry for chunk 2") + } e.mu.Lock() state := e.state e.mu.Unlock()