From 2f698ab6e3e264e7df8f145f7390748b01eb58ae Mon Sep 17 00:00:00 2001 From: Rapiz Date: Mon, 1 Feb 2021 13:19:08 +0800 Subject: [PATCH] Fix TestRecvMessageType_MsgRequestVote2AA (#245) Provide with valid peers so that responses will not be ignored. --- 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 2e5d0ca1..00c4f701 100644 --- a/raft/raft_test.go +++ b/raft/raft_test.go @@ -634,7 +634,7 @@ func TestRecvMessageType_MsgRequestVote2AA(t *testing.T) { } for i, tt := range tests { - sm := newTestRaft(1, []uint64{1}, 10, 1, NewMemoryStorage()) + sm := newTestRaft(1, []uint64{1, 2}, 10, 1, NewMemoryStorage()) sm.State = tt.state sm.Vote = tt.voteFor sm.RaftLog = newLog(newMemoryStorageWithEnts([]pb.Entry{{}, {Index: 1, Term: 2}, {Index: 2, Term: 2}}))