raft: refine initial entries logic in StartNode

This commit is contained in:
Yicheng Qin
2014-10-06 15:22:35 -07:00
parent c15c3eab4c
commit 45ebfb4217
7 changed files with 28 additions and 36 deletions

View File

@@ -175,7 +175,7 @@ func TestNode(t *testing.T) {
},
}
n := StartNode(1, []int64{1}, 0, 0, []raftpb.ConfChange{cc})
n := StartNode(1, []int64{1}, 0, 0)
n.Campaign(ctx)
if g := <-n.Ready(); !reflect.DeepEqual(g, wants[0]) {
t.Errorf("#%d: g = %+v,\n w %+v", 1, g, wants[0])