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

openshift-rebase(v1.24):source=c83ceebb078
  • Loading branch information
deads2k authored and soltysh committed Aug 22, 2022
1 parent 424aec8 commit 0e3f686
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 @@ -78,7 +78,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 @@ -87,9 +89,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 0e3f686

Please sign in to comment.