mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: refactor restart test
This commit is contained in:
parent
54734b0903
commit
19235c8104
@ -51,9 +51,9 @@ func TestNodeRestart(t *testing.T) {
|
||||
st := raftpb.State{Term: 1, Vote: -1, Commit: 1, LastIndex: 2}
|
||||
|
||||
want := Ready{
|
||||
State: raftpb.State{Term: 1, Vote: -1, Commit: 1, LastIndex: 2},
|
||||
State: st,
|
||||
// commit upto index 1
|
||||
CommittedEntries: []raftpb.Entry{{Term: 1, Index: 1}},
|
||||
CommittedEntries: entries[:st.Commit],
|
||||
}
|
||||
|
||||
n := Restart(1, []int64{1}, 0, 0, st, entries)
|
||||
|
Loading…
x
Reference in New Issue
Block a user