test: verify chunk data after interrupted detach handover

This commit is contained in:
pingqiu committed 2026-11-22 23:38:53 -08:00
1 parent 81f602d96a
commit 895a9e5998
1 file changed
+11
@@ -11,6 +11,8 @@ import (
"syscall"
"testing"
"time"
"github.com/seaweedfs/seaweed-block/core/frontend/chunkstore"
)
// P12.6 / INV-WS-SEAL-REPLAY-001: a SIGKILL during plain-seal upload
@@ -105,6 +107,15 @@ func TestProcedureKillDuringPlainDetachThenCompleteHandoff(t *testing.T) {
t.Fatalf("clean move adopted epoch %d; want %d", got, e2)
}
env.requireCutCrashImage(t, "s1", 'B')
verified, _ := env.h.command(t, "ops", "chunk", "verify", "--volume", "v1",
"--chunk-filer", env.cluster.filerGRPC, "--chunk-path", env.chunkPath,
"--depth", "data", "--timeout", "60s", "--bytes-per-sec", "0")
var result chunkstore.VerifyResult
if err := json.Unmarshal([]byte(verified), &result); err != nil || !result.Complete ||
result.Depth != chunkstore.VerifyData || len(result.Findings) != 0 || result.ChunksNotRead != 0 ||
result.DistinctChunksRead == 0 {
t.Fatalf("post-move data verify incomplete or corrupt: %s: %v", verified, err)
}
}
// This is the real filer's public listing of immutable key bindings, not