diff --git a/raft/raft_test.go b/raft/raft_test.go index fbe50431..68cfe877 100644 --- a/raft/raft_test.go +++ b/raft/raft_test.go @@ -1082,7 +1082,7 @@ func TestProvideSnap2C(t *testing.T) { // force set the next of node 2, so that node 2 needs a snapshot sm.Prs[2].Next = 0 - sm.Step(pb.Message{From: 2, To: 1, MsgType: pb.MessageType_MsgAppendResponse, Index: sm.Prs[2].Next - 1, Reject: true}) + sm.Step(pb.Message{From: 2, To: 1, Term: 1, MsgType: pb.MessageType_MsgAppendResponse, Index: sm.Prs[2].Next - 1, Reject: true}) msgs := sm.readMessages() if len(msgs) != 1 {