mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: remove vote with default value
This commit is contained in:
parent
dc1357afa9
commit
073411f23f
@ -14,12 +14,12 @@ func TestNode(t *testing.T) {
|
|||||||
|
|
||||||
wants := []Ready{
|
wants := []Ready{
|
||||||
{
|
{
|
||||||
State: raftpb.State{Term: 1, Vote: none, Commit: 1, LastIndex: 1},
|
State: raftpb.State{Term: 1, Commit: 1, LastIndex: 1},
|
||||||
Entries: []raftpb.Entry{{Term: 1, Index: 1}},
|
Entries: []raftpb.Entry{{Term: 1, Index: 1}},
|
||||||
CommittedEntries: []raftpb.Entry{{Term: 1, Index: 1}},
|
CommittedEntries: []raftpb.Entry{{Term: 1, Index: 1}},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
State: raftpb.State{Term: 1, Vote: none, Commit: 2, LastIndex: 2},
|
State: raftpb.State{Term: 1, Commit: 2, LastIndex: 2},
|
||||||
Entries: []raftpb.Entry{{Term: 1, Index: 2, Data: []byte("foo")}},
|
Entries: []raftpb.Entry{{Term: 1, Index: 2, Data: []byte("foo")}},
|
||||||
CommittedEntries: []raftpb.Entry{{Term: 1, Index: 2, Data: []byte("foo")}},
|
CommittedEntries: []raftpb.Entry{{Term: 1, Index: 2, Data: []byte("foo")}},
|
||||||
},
|
},
|
||||||
@ -48,7 +48,7 @@ func TestNodeRestart(t *testing.T) {
|
|||||||
{Term: 1, Index: 1},
|
{Term: 1, Index: 1},
|
||||||
{Term: 1, Index: 2, Data: []byte("foo")},
|
{Term: 1, Index: 2, Data: []byte("foo")},
|
||||||
}
|
}
|
||||||
st := raftpb.State{Term: 1, Vote: none, Commit: 1, LastIndex: 2}
|
st := raftpb.State{Term: 1, Commit: 1, LastIndex: 2}
|
||||||
|
|
||||||
want := Ready{
|
want := Ready{
|
||||||
State: emptyState,
|
State: emptyState,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user