This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I decided to spin up another test class for this as the existing one is 1. quite old and 2. was mocking away too much of the infrastructure to my liking. I've named the new class alluding to ephemeral messages, and while we already have some ephemeral tests in AppServiceHandlerTestCase, ideally I'd like to migrate those over. There's two new tests here. One for testing that to-device messages for a local user are received by any application services that have registered interest in that user - and that those that haven't won't receive those messages. The next test is similar, but tests with a whole bunch of to-device messages. Rather than registering tons of devices - which would make for a very slow unit test - I decided to just directly insert most of the to-device messages into the database, then send a final one via the API. Sending via the API is necessary to kick off the appservice scheduler. It also allows us to test old messages being sent out correctly.
- Loading branch information
1 parent
4148ae0
commit 8d666bd
Showing
3 changed files
with
289 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters