Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kotlin: ensure test triggers _some_ work
This is required because of the changes made to ping.submit before and how it was used internally. Previously in event_database, when triggering startup event pings, we only checked if storing a ping did not fail. We did not check if any ping was actually submitted. So the code around it launched a task on the workmanager, which then subsequently checked and did nothing. The test ensured that, and triggering the work manager was just fine because there _was_ a pending task. With the changes we now return `true` if any ping was submitted. Or `false` if no event ping was submitted on startup. Now on startup no task was triggered and thus no workmanager can be triggered. That made the test fail because `triggerWorkManager` requires a task to be enqueued. We can force a task by also recording into the builtin "events" ping. It's a small hack, but allows us to test that late-registered pings with events are correctly skipped AND their events are deleted.
- Loading branch information