Skip to content

Commit

Permalink
Merge pull request #17356 from MadhavJivrajani/fix-out-of-index-error
Browse files Browse the repository at this point in the history
tests/robustness: fix out of index panic in model replay
  • Loading branch information
serathius authored Feb 1, 2024
2 parents 6d37790 + f0f4e8a commit 13b4894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/robustness/model/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (r *EtcdReplay) next() (request EtcdRequest, revision int64, index int) {
revision = r.eventHistory[r.eventHistoryIndex].Revision
index = r.eventHistoryIndex
operations := []EtcdOperation{}
for r.eventHistory[index].Revision == revision {
for index < len(r.eventHistory) && r.eventHistory[index].Revision == revision {
event := r.eventHistory[index]
switch event.Type {
case PutOperation:
Expand Down

0 comments on commit 13b4894

Please sign in to comment.