raft: fix a few problems

This commit is contained in:
swingbach@gmail.com
2016-07-11 14:59:53 +08:00
parent e020b2a228
commit 0d9b6ba0ab
3 changed files with 16 additions and 8 deletions

View File

@ -2217,6 +2217,7 @@ func TestLeaderTransferWithCheckQuorum(t *testing.T) {
r.checkQuorum = true
}
// Letting peer 2 electionElapsed reach to timeout so that it can vote for peer 1
f := nt.peers[2].(*raft)
for i := 0; i < f.electionTimeout; i++ {
f.tick()