mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft/log_test: fixed wrong index
This commit is contained in:
parent
5f42161750
commit
b0534c1b44
@ -426,7 +426,7 @@ func TestUnstableEnts(t *testing.T) {
|
||||
|
||||
ents := raftLog.unstableEntries()
|
||||
if l := len(ents); l > 0 {
|
||||
raftLog.stableTo(ents[l-1].Index, ents[l-i].Term)
|
||||
raftLog.stableTo(ents[l-1].Index, ents[l-1].Term)
|
||||
}
|
||||
if !reflect.DeepEqual(ents, tt.wents) {
|
||||
t.Errorf("#%d: unstableEnts = %+v, want %+v", i, ents, tt.wents)
|
||||
|
Loading…
x
Reference in New Issue
Block a user