diff options
author | Neil Johnson <neil@matrix.org> | 2018-08-14 16:40:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-14 16:40:11 +0000 |
commit | aa3220df6ad3292c556ee92d8a13a29fefddb16f (patch) | |
tree | 5eaf700425afb2936220eb73ae7c37d270d1f18c | |
parent | Merge pull request #3670 from matrix-org/neilj/mau_sync_block (diff) | |
parent | fix setup_test_homeserver to be postgres compatible (diff) | |
download | synapse-aa3220df6ad3292c556ee92d8a13a29fefddb16f.tar.xz |
Merge pull request #3692 from matrix-org/neil/fix_postgres_test_initialise_reserved_users
Neil/fix postgres test initialise reserved users
-rw-r--r-- | changelog.d/3692.bugfix | 1 | ||||
-rw-r--r-- | synapse/storage/monthly_active_users.py | 2 | ||||
-rw-r--r-- | tests/handlers/test_sync.py | 2 | ||||
-rw-r--r-- | tests/storage/test_monthly_active_users.py | 2 |
4 files changed, 4 insertions, 3 deletions
diff --git a/changelog.d/3692.bugfix b/changelog.d/3692.bugfix new file mode 100644 index 0000000000..f44e13dca1 --- /dev/null +++ b/changelog.d/3692.bugfix @@ -0,0 +1 @@ +Fix missing yield in synapse.storage.monthly_active_users.initialise_reserved_users diff --git a/synapse/storage/monthly_active_users.py b/synapse/storage/monthly_active_users.py index 7b36accdb6..7e417f811e 100644 --- a/synapse/storage/monthly_active_users.py +++ b/synapse/storage/monthly_active_users.py @@ -46,7 +46,7 @@ class MonthlyActiveUsersStore(SQLBaseStore): tp["medium"], tp["address"] ) if user_id: - self.upsert_monthly_active_user(user_id) + yield self.upsert_monthly_active_user(user_id) reserved_user_list.append(user_id) else: logger.warning( diff --git a/tests/handlers/test_sync.py b/tests/handlers/test_sync.py index cfd37f3138..8c8b65e04e 100644 --- a/tests/handlers/test_sync.py +++ b/tests/handlers/test_sync.py @@ -29,7 +29,7 @@ class SyncTestCase(tests.unittest.TestCase): @defer.inlineCallbacks def setUp(self): - self.hs = yield setup_test_homeserver() + self.hs = yield setup_test_homeserver(self.addCleanup) self.sync_handler = SyncHandler(self.hs) self.store = self.hs.get_datastore() diff --git a/tests/storage/test_monthly_active_users.py b/tests/storage/test_monthly_active_users.py index 0d58dcebc5..511acbde9b 100644 --- a/tests/storage/test_monthly_active_users.py +++ b/tests/storage/test_monthly_active_users.py @@ -33,7 +33,7 @@ class MonthlyActiveUsersTestCase(tests.unittest.TestCase): @defer.inlineCallbacks def test_initialise_reserved_users(self): - + self.hs.config.max_mau_value = 5 user1 = "@user1:server" user1_email = "user1@matrix.org" user2 = "@user2:server" |