diff options
author | Erik Johnston <erikj@jki.re> | 2016-10-11 15:41:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-11 15:41:55 +0100 |
commit | e641115421b44c567bc0f1ca8d39a83e32891383 (patch) | |
tree | 51a8cb5ed3f294887bdcc2d6ef36efcad186af07 /tests | |
parent | Merge pull request #1166 from matrix-org/rav/grandfather_broken_riot_signup (diff) | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into erikj/replicatio... (diff) | |
download | synapse-e641115421b44c567bc0f1ca8d39a83e32891383.tar.xz |
Merge pull request #1141 from matrix-org/erikj/replication_noop
Reduce DB hits for replication
Diffstat (limited to 'tests')
-rw-r--r-- | tests/replication/slave/storage/_base.py | 3 | ||||
-rw-r--r-- | tests/replication/test_resource.py | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/replication/slave/storage/_base.py b/tests/replication/slave/storage/_base.py index 1f13cd0bc0..b82868054d 100644 --- a/tests/replication/slave/storage/_base.py +++ b/tests/replication/slave/storage/_base.py @@ -42,7 +42,8 @@ class BaseSlavedStoreTestCase(unittest.TestCase): @defer.inlineCallbacks def replicate(self): streams = self.slaved_store.stream_positions() - result = yield self.replication.replicate(streams, 100) + writer = yield self.replication.replicate(streams, 100) + result = writer.finish() yield self.slaved_store.process_replication(result) @defer.inlineCallbacks diff --git a/tests/replication/test_resource.py b/tests/replication/test_resource.py index b69832cc1b..f406934a62 100644 --- a/tests/replication/test_resource.py +++ b/tests/replication/test_resource.py @@ -120,7 +120,7 @@ class ReplicationResourceCase(unittest.TestCase): self.hs.clock.advance_time_msec(1) code, body = yield get self.assertEquals(code, 200) - self.assertEquals(body, {}) + self.assertEquals(body.get("rows", []), []) test_timeout.__name__ = "test_timeout_%s" % (stream) return test_timeout @@ -195,7 +195,6 @@ class ReplicationResourceCase(unittest.TestCase): self.assertIn("field_names", stream) field_names = stream["field_names"] self.assertIn("rows", stream) - self.assertTrue(stream["rows"]) for row in stream["rows"]: self.assertEquals( len(row), len(field_names), |