-
-
Notifications
You must be signed in to change notification settings - Fork 2
Add tests for notification scheduling and updates #180
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
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.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
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.
[P1] Run update notification task before asserting results
The test invokes checkAndSendUpdateNotification() and immediately inspects the shadow NotificationManager, but the method under test wires an OnSuccessListener to a Play Core Task which posts the listener to the main looper. Because the test never drains the main looper, the listener is never executed and no channel or notification is created, causing the assertions to fail. Ensure the test advances the main looper (e.g. Shadows.shadowOf(Looper.getMainLooper()).idle() or supply a direct executor) before asserting the results.
Useful? React with 👍 / 👎.
Summary
Testing
./gradlew test(fails: Failed to install the following Android SDK packages as some licences have not been accepted)https://chatgpt.com/codex/tasks/task_e_68c66baecc54832da894d6dde379a39d