mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 02:27:26 +01:00
test: keep clean move precondition negatives on the same replica
This commit is contained in:
1 parent
38ad04b42f
commit
2427e765e2
1 file changed
+2
-1
@@ -82,7 +82,7 @@ func TestWorkspaceRPCCleanMovePreservesReplicaIdentity(t *testing.T) {
|
||||
if err := g.Refresh(ctx); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
q := &control.WorkspaceMove{RequestId: "clean-1", VolumeId: "vol-a", ExpectedReplicaId: "r2", ExpectedEpoch: 1, TargetReplicaId: "r1", TargetServerId: "node-b",
|
||||
q := &control.WorkspaceMove{RequestId: "clean-1", VolumeId: "vol-a", ExpectedReplicaId: "r2", ExpectedEpoch: 1, TargetReplicaId: "r2", TargetServerId: "node-b",
|
||||
TargetDataAddr: "127.0.0.1:9201", TargetCtrlAddr: "127.0.0.1:9101", Kind: "clean"}
|
||||
if _, err := client.MoveWorkspace(ctx, q); err == nil {
|
||||
t.Fatal("move without detached/ACK accepted")
|
||||
@@ -112,6 +112,7 @@ func TestWorkspaceRPCCleanMovePreservesReplicaIdentity(t *testing.T) {
|
||||
}
|
||||
beforeLine, _ := h.Publisher().VolumeAuthorityLine("vol-a")
|
||||
beforeState := h.Publisher().WorkspaceState("vol-a")
|
||||
q.TargetReplicaId = "r1" // Only this fully prepared negative changes logical identity.
|
||||
if grant, err := client.MoveWorkspace(ctx, q); err == nil {
|
||||
t.Fatalf("v1 accepted logical replica change r2 -> r1: %v", grant)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user