Merge pull request #112334 from dgrisonnet/fix-eventseries-count

Fix EventSeries starting count discrepancy

Kubernetes-commit: 689fc37dd2f92ca61f4f2405186cb7e097be3ab1
This commit is contained in:
Kubernetes Publisher 2023-03-14 07:28:16 -07:00
commit 2a7ba94880
2 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,7 @@ func (e *eventBroadcasterImpl) recordToSink(event *eventsv1.Event, clock clock.C
return nil
}
isomorphicEvent.Series = &eventsv1.EventSeries{
Count: 1,
Count: 2,
LastObservedTime: metav1.MicroTime{Time: clock.Now()},
}
// Make a copy of the Event to make sure that recording it

View File

@ -108,7 +108,7 @@ func TestEventSeriesf(t *testing.T) {
nonIsomorphicEvent := expectedEvent.DeepCopy()
nonIsomorphicEvent.Action = "stopped"
expectedEvent.Series = &eventsv1.EventSeries{Count: 1}
expectedEvent.Series = &eventsv1.EventSeries{Count: 2}
table := []struct {
regarding k8sruntime.Object
related k8sruntime.Object