-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add database test for SubscriptionManager #8456
Conversation
Are you adding all possible tests that involve the database? If not, then I don't think you should link this PR to that issue. This would then be one of several PRs that work towards completion of the objective stated there. |
@SydneyDrone Please try to provide a reason when you close a PR. It helps when we're looking at it in the future. |
@SydneyDrone thank you for writing these tests, I think they are valid. Could you reopen? |
It's reopened now. Sorry for the inconvenience. |
I made some changes:
Now the tests pass and I think they are reasonable. Tell me what you think ;-) |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
- fix checkstyle errors - tests do not run in order, so each one has to do its own assertions separately from what others did - the uid of an entity in the database needn't be the same of the one created in-memory, since the uid gets assigned upon inserting in the database - some database functions return a `Completable` that doesn't do anything until it is subscribed to or awaited, so I added `.awaitBlocking()` where needed - the data of an entity in-memory does not get updated automatically when the corresponding entity in the database is changed, so some tests have been removed - `manager.insertSubscription` only inserts recent streams, so they need to have a date set on them (I also made related items hardcoded and not dependent on what the channel is currently doing)
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
What is it?
Description of the changes in your PR
ChannelInfo
I insert doesn't equal to the one I searched. The test result shows that it's because of their difference in the uid. IDK if it is designed to operate like that. If it is, I will delete the corresponding test cases in later commit.updateNotificationMode()
method doesn't seems to function correctly. ThetestUpdateNotificationMode()
method 2 and 4 seems to be problematic and redundant, but I will temporarily keep them until this problem is solved or clairfied.rememberAllStreams()
method doesn't seems to fetch all videos as it should be (in my test case, it just fetched two instead of the total number of 100+)Before/After Screenshots/Screen Record
Fixes the following issue(s)
Due diligence