Merge pull request #17356 from MadhavJivrajani/fix-out-of-index-error

tests/robustness: fix out of index panic in model replay
This commit is contained in:
Marek Siarkowicz 2024-02-01 12:24:10 +01:00 committed by GitHub
commit 13b48947d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: