-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Correctly catch potentially null value #2330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. referenceDatabase gets called in the if statement, so checkign that it is null and not referenceSnapshot is what's neede.
I reviewed the changes in the commit and agree, @nvoxland, that there is nothing additional to test from a QA perspective. Should there be a unit test for this change? All automated tests passed. |
@XDelphiGrl I think probably not a useful enough unit test. The code is trying to do a lot of things there, and a lot of it is around how it's interacting with the outside systems and the coordination between components. I'd like to eventually be able to refactor that code to have a better separation between what we'd test as a unit and what takes integration/coordination tests. But since we don't want to get into that right now for this change, I think the existing tests cover it well enough even if they are a bit slower to test it. |
@nvoxland, thank you for taking a look at adding a test; makes sense to skip since it would add little value. Moving to ready to merge. |
check if referenceDatabase not null instead of referenceSnapshot.
Dev Handoff Notes (Internal Use)
Links
Testing
Dev Verification
Reviewed code.