raft: testVote - breaks state machine init to multiple lines

This commit is contained in:
Xiang Li 2014-05-27 22:23:14 -07:00 committed by Yicheng Qin
parent 59a720d8be
commit b3de2b3450

View File

@ -379,7 +379,14 @@ func TestVote(t *testing.T) {
for i, tt := range tests {
called := false
sm := &nsm{stateMachine{state: tt.state, vote: tt.voteFor, log: &log{ents: []Entry{{}, {Term: 2}, {Term: 2}}}}, nil}
sm := &nsm{
stateMachine{
state: tt.state,
vote: tt.voteFor,
log: &log{ents: []Entry{{}, {Term: 2}, {Term: 2}}},
},
nil,
}
sm.next = stepperFunc(func(m Message) {
called = true