Skip to content

Commit

Permalink
UPSTREAM: 103612: tolerate additional, but congruent, events for inte…
Browse files Browse the repository at this point in the history
…gration test
  • Loading branch information
deads2k authored and damemi committed Dec 6, 2021
1 parent 52813f9 commit ea9b36b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/integration/events/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ func TestEventCompatibility(t *testing.T) {
return false, err
}

if len(v1Events.Items) != 2 {
// Be sure that at least the events we sent in the test were delivered.
// To add any events from the kube-apiserver itself will require this tolerate additional events.
if len(v1Events.Items) < 2 {
return false, nil
}

Expand All @@ -84,9 +86,15 @@ func TestEventCompatibility(t *testing.T) {
return false, err
}

if len(events.Items) != 2 {
if len(events.Items) < 2 {
return false, nil
}

// Be sure that both APIs produce the same number of events.
if len(events.Items) != len(v1Events.Items) {
return false, nil
}

return true, nil
})
if err != nil {
Expand Down

0 comments on commit ea9b36b

Please sign in to comment.