mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-08 00:45:00 -04:00
Modernize unit tests configuration settings for workers. (#14568)
Use the newer foo_instances configuration instead of the deprecated flags to enable specific features (e.g. start_pushers).
This commit is contained in:
parent
7aefc7e9fc
commit
854a6884d8
18 changed files with 123 additions and 81 deletions
|
@ -38,11 +38,6 @@ class PusherShardTestCase(BaseMultiWorkerStreamTestCase):
|
|||
self.other_user_id = self.register_user("otheruser", "pass")
|
||||
self.other_access_token = self.login("otheruser", "pass")
|
||||
|
||||
def default_config(self):
|
||||
conf = super().default_config()
|
||||
conf["start_pushers"] = False
|
||||
return conf
|
||||
|
||||
def _create_pusher_and_send_msg(self, localpart):
|
||||
# Create a user that will get push notifications
|
||||
user_id = self.register_user(localpart, "pass")
|
||||
|
@ -92,8 +87,8 @@ class PusherShardTestCase(BaseMultiWorkerStreamTestCase):
|
|||
)
|
||||
|
||||
self.make_worker_hs(
|
||||
"synapse.app.pusher",
|
||||
{"start_pushers": False},
|
||||
"synapse.app.generic_worker",
|
||||
{"worker_name": "pusher1", "pusher_instances": ["pusher1"]},
|
||||
proxied_blacklisted_http_client=http_client_mock,
|
||||
)
|
||||
|
||||
|
@ -122,9 +117,8 @@ class PusherShardTestCase(BaseMultiWorkerStreamTestCase):
|
|||
)
|
||||
|
||||
self.make_worker_hs(
|
||||
"synapse.app.pusher",
|
||||
"synapse.app.generic_worker",
|
||||
{
|
||||
"start_pushers": True,
|
||||
"worker_name": "pusher1",
|
||||
"pusher_instances": ["pusher1", "pusher2"],
|
||||
},
|
||||
|
@ -137,9 +131,8 @@ class PusherShardTestCase(BaseMultiWorkerStreamTestCase):
|
|||
)
|
||||
|
||||
self.make_worker_hs(
|
||||
"synapse.app.pusher",
|
||||
"synapse.app.generic_worker",
|
||||
{
|
||||
"start_pushers": True,
|
||||
"worker_name": "pusher2",
|
||||
"pusher_instances": ["pusher1", "pusher2"],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue