Skip to content

Commit

Permalink
Merge pull request #16757 from serathius/minimal-time
Browse files Browse the repository at this point in the history
Use the minimal time event was observed on watch
  • Loading branch information
serathius authored Oct 16, 2023
2 parents aea6f0b + 4c7b8db commit 4791964
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/robustness/validate/patch_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ func uniqueWatchEvents(reports []report.ClientReport) map[model.Event]traffic.Ti
for _, op := range r.Watch {
for _, resp := range op.Responses {
for _, event := range resp.Events {
persisted[event.Event] = traffic.TimedWatchEvent{Time: resp.Time, WatchEvent: event}
responseTime := resp.Time
if prev, found := persisted[event.Event]; found && prev.Time < responseTime {
responseTime = prev.Time
}
persisted[event.Event] = traffic.TimedWatchEvent{Time: responseTime, WatchEvent: event}
}
}
}
Expand Down

0 comments on commit 4791964

Please sign in to comment.