From d06e805544d8569739c4c1f454925652ccf65e96 Mon Sep 17 00:00:00 2001 From: Connor1996 Date: Tue, 28 Apr 2020 16:37:30 +0800 Subject: [PATCH] add missing term Signed-off-by: Connor1996 --- raft/raft_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {