-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Remove unnecessary rmq database operations in unit tests. #4236
Conversation
@chliangGoogle Looks like the tests are still failing https://travis-ci.org/firebase/firebase-ios-sdk/jobs/607466145?utm_medium=notification&utm_source=github_status |
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.
Thank you for taking care of it!
_testUtil = [[FIRMessagingTestUtilities alloc] initWithUserDefaults:defaults withRMQManager:YES]; | ||
_mockMessaging = _testUtil.mockMessaging; | ||
_mockInstanceID = _testUtil.mockInstanceID; | ||
_messaging = _testUtil.messaging; |
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.
Maybe just remove _mockMessaging
, _mockInstanceID
, etc. and refer to _testUtil
directly to avoid potential confusion in the future?
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.
this gonna be a big refactor, will probably do it in another CL.
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.
This is done in this PR.
xcode 10.2 seems to start failing but with some unrelated errors |
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.
Failure is unrelated to Messaging. Also couldn't find the restart the test button anymore. I just submit the code for now. |
DB operations between different test class that access the same database sometimes cause race conditions. Minimize DB initialization and operations to see if this resolves the issue.