Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check attribute filter deep equals #2246

Merged
merged 6 commits into from
Jun 9, 2022

Conversation

YvonneCeelie
Copy link
Contributor

Since 4.5.10 when I register a field to be ignored in a fixture test, the field is not ignored. In the DeepEqualsMatcher a check is missing when before calling the equals method of the object.

@YvonneCeelie YvonneCeelie added Type: Bug Use to signal issues that describe a bug within the system. Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: In Progress Use to signal this issue is actively worked on. labels Jun 7, 2022
@YvonneCeelie YvonneCeelie self-assigned this Jun 7, 2022
@YvonneCeelie YvonneCeelie modified the milestone: Release 4.6.0 Jun 7, 2022
@YvonneCeelie YvonneCeelie changed the base branch from master to axon-4.5.x June 7, 2022 14:35
@smcvb smcvb added this to the Release 4.5.11 milestone Jun 8, 2022
Copy link
Member

@smcvb smcvb left a comment

Choose a reason for hiding this comment

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

Although this works, we can pull this a little broader by validating if the configured filter in the DeepEqualsMatcher is of type AllFieldsFilter. If this is the case, we can assume that (1) the user doesn't care because they set the filter to AllFieldsFilter or (2) they haven't adjusted the filter and use the default.

By checking whether the AllFieldsFilter is used, we can deduce if
somebody wants to filter the contents of the event. If this is the case,
 we shouldn't go down the top-level equals path, but down the reflective
  equals path.

#2246
Copy link
Member

@smcvb smcvb left a comment

Choose a reason for hiding this comment

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

My concerns have been addressed, hence I'm approving this pull request.

@sonarcloud
Copy link

sonarcloud bot commented Jun 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@smcvb smcvb merged commit ba10069 into axon-4.5.x Jun 9, 2022
@smcvb smcvb deleted the check-attribute-filter-deep-equals branch June 9, 2022 07:56
@smcvb smcvb added Status: Resolved Use to signal that work on this issue is done. and removed Status: In Progress Use to signal this issue is actively worked on. labels Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority 1: Must Highest priority. A release cannot be made if this issue isn’t resolved. Status: Resolved Use to signal that work on this issue is done. Type: Bug Use to signal issues that describe a bug within the system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants