RUMM-3041 The RumEventMapper checks ViewEvents by reference#1279
Merged
mariusc83 merged 1 commit intoFeb 14, 2023
Conversation
mariusc83
force-pushed
the
mconstantin/rumm-3041/rumeventmapper-should-check-mapped-object-by-reference
branch
from
February 13, 2023 09:56
34b3014 to
2fecd9c
Compare
Codecov Report
@@ Coverage Diff @@
## develop #1279 +/- ##
===========================================
+ Coverage 81.85% 81.92% +0.07%
===========================================
Files 361 361
Lines 12835 12835
Branches 2148 2148
===========================================
+ Hits 10505 10514 +9
Misses 1664 1664
+ Partials 666 657 -9
|
0xnm
requested changes
Feb 13, 2023
| val mappedRumEvent = testedRumEventMapper.map(fakeRumEvent) | ||
|
|
||
| // THEN | ||
| assertThat(mappedRumEvent).isEqualTo(fakeRumEvent) |
Member
There was a problem hiding this comment.
we need to use isSameAs here, because this line will be green even if another instance is returned (isEqualTo will call equals).
Suggested change
| assertThat(mappedRumEvent).isEqualTo(fakeRumEvent) | |
| assertThat(mappedRumEvent).isEqualTo(fakeRumEvent) |
The log verification below helps though to avoid this test to pass-by.
mariusc83
force-pushed
the
mconstantin/rumm-3041/rumeventmapper-should-check-mapped-object-by-reference
branch
from
February 14, 2023 09:21
2fecd9c to
9a30cdd
Compare
0xnm
approved these changes
Feb 14, 2023
mariusc83
deleted the
mconstantin/rumm-3041/rumeventmapper-should-check-mapped-object-by-reference
branch
February 14, 2023 10:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
There was a bug in the
RumEventMapperbecause for theViewEventwe were comparing the original object with the mapped one by value and not by reference as required.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)