Skip to content

improve: additional tests for event filtering#3461

Open
csviri wants to merge 3 commits into
operator-framework:nextfrom
csviri:additional-tests
Open

improve: additional tests for event filtering#3461
csviri wants to merge 3 commits into
operator-framework:nextfrom
csviri:additional-tests

Conversation

@csviri

@csviri csviri commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Signed-off-by: Attila Mészáros a_meszaros@apple.com

Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Copilot AI review requested due to automatic review settings July 1, 2026 14:15
@openshift-ci openshift-ci Bot requested review from metacosm and xstefank July 1, 2026 14:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends unit test coverage around informer event filtering, adding additional scenarios to validate how EventFilterSupport/EventFilterWindow emit or suppress events across edge cases.

Changes:

  • Added a basic “no active window” processing test for processEvent.
  • Added new edge-case tests covering deletes during active updates without recorded own versions, synth event construction from leading ADD, handling of leading DELETE, and ghost removal on lingering windows.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +614 to +616
assertThat(support.doneEventFilterModify(RESOURCE_ID))
.hasValueSatisfying(e -> assertThat(e.getAction()).isEqualTo(UPDATED));
assertThat(support.isActiveUpdateFor(RESOURCE_ID)).isFalse();
Comment on lines +627 to +631
assertThat(support.processEvent(RESOURCE_ID, deleteEvent(FIRST_OWN_VERSION - 1))).isEmpty();
assertThat(support.processEvent(RESOURCE_ID, updateEvent(FIRST_OWN_VERSION))).isEmpty();
assertThat(support.processEvent(RESOURCE_ID, updateEvent(FIRST_OWN_VERSION + 2)))
.hasValueSatisfying(e -> assertThat(e.getAction()).isEqualTo(UPDATED));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants