raft: transfer leader feature

This commit is contained in:
es-chow
2016-03-24 19:59:41 +08:00
parent 1c12b66e35
commit ac059eb8cb
9 changed files with 378 additions and 38 deletions

View File

@ -33,7 +33,7 @@ func TestRawNodeStep(t *testing.T) {
msgt := raftpb.MessageType(i)
err = rawNode.Step(raftpb.Message{Type: msgt})
// LocalMsg should be ignored.
if msgt == raftpb.MsgBeat || msgt == raftpb.MsgHup || msgt == raftpb.MsgUnreachable || msgt == raftpb.MsgSnapStatus {
if IsLocalMsg(msgt) {
if err != ErrStepLocalMsg {
t.Errorf("%d: step should ignore %s", msgt, msgn)
}