Fix TestRecvMessageType_MsgRequestVote2AA (#245)

Provide with valid peers so that responses will not be ignored.
This commit is contained in:
Rapiz 2021-02-01 13:19:08 +08:00 committed by GitHub
parent eb173f0df1
commit 2f698ab6e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}}))