summary refs log tree commit diff
path: root/tests/replication
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-11-28 08:54:07 +1100
committerGitHub <noreply@github.com>2019-11-28 08:54:07 +1100
commit0f87b912aba7e678041632bc9a6d1f7c2d24342c (patch)
tree6381748f864954fb84c63764a1d2c5e8cb5e4e0f /tests/replication
parentadd etag and count to key backup endpoints (#5858) (diff)
downloadsynapse-0f87b912aba7e678041632bc9a6d1f7c2d24342c.tar.xz
Implementation of MSC2314 (#6176)
Diffstat (limited to 'tests/replication')
-rw-r--r--tests/replication/slave/storage/_base.py3
-rw-r--r--tests/replication/tcp/streams/_base.py4
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/replication/slave/storage/_base.py b/tests/replication/slave/storage/_base.py
index 4f924ce451..e7472e3a93 100644
--- a/tests/replication/slave/storage/_base.py
+++ b/tests/replication/slave/storage/_base.py
@@ -48,7 +48,10 @@ class BaseSlavedStoreTestCase(unittest.HomeserverTestCase):
         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
         )
diff --git a/tests/replication/tcp/streams/_base.py b/tests/replication/tcp/streams/_base.py
index ce3835ae6a..1d14e77255 100644
--- a/tests/replication/tcp/streams/_base.py
+++ b/tests/replication/tcp/streams/_base.py
@@ -12,6 +12,8 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+from mock import Mock
+
 from synapse.replication.tcp.commands import ReplicateCommand
 from synapse.replication.tcp.protocol import ClientReplicationStreamProtocol
 from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory
@@ -30,7 +32,9 @@ class BaseStreamTestCase(unittest.HomeserverTestCase):
         server = server_factory.buildProtocol(None)
 
         # build a replication client, with a dummy handler
+        handler_factory = Mock()
         self.test_handler = TestReplicationClientHandler()
+        self.test_handler.factory = handler_factory
         self.client = ClientReplicationStreamProtocol(
             "client", "test", clock, self.test_handler
         )