summary refs log tree commit diff
path: root/tests/replication/slave/storage/_base.py
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2019-12-10 11:25:28 +0000
committerNeil Johnson <neil@matrix.org>2019-12-10 11:25:28 +0000
commit0a522121a0801e5474397b4f01730bf1896bc497 (patch)
tree80b491e8965c0a99127e33789ac28c39ae660ad4 /tests/replication/slave/storage/_base.py
parentMerge branch 'release-v1.6.1' of github.com:matrix-org/synapse into matrix-or... (diff)
parentFix erroneous reference for new room directory defaults. (diff)
downloadsynapse-0a522121a0801e5474397b4f01730bf1896bc497.tar.xz
Merge branch 'release-v1.7.0' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'tests/replication/slave/storage/_base.py')
-rw-r--r--tests/replication/slave/storage/_base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/replication/slave/storage/_base.py b/tests/replication/slave/storage/_base.py

index 4f924ce451..3dae83c543 100644 --- a/tests/replication/slave/storage/_base.py +++ b/tests/replication/slave/storage/_base.py
@@ -20,6 +20,7 @@ from synapse.replication.tcp.client import ( ReplicationClientHandler, ) from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory +from synapse.storage.database import Database from tests import unittest from tests.server import FakeTransport @@ -42,13 +43,18 @@ class BaseSlavedStoreTestCase(unittest.HomeserverTestCase): self.master_store = self.hs.get_datastore() self.storage = hs.get_storage() - self.slaved_store = self.STORE_TYPE(self.hs.get_db_conn(), self.hs) + self.slaved_store = self.STORE_TYPE( + Database(hs), self.hs.get_db_conn(), self.hs + ) self.event_id = 0 server_factory = ReplicationStreamProtocolFactory(self.hs) self.streamer = server_factory.streamer + handler_factory = Mock() self.replication_handler = ReplicationClientHandler(self.slaved_store) + self.replication_handler.factory = handler_factory + client_factory = ReplicationClientFactory( self.hs, "client_name", self.replication_handler )