diff --git a/changelog.d/3692.bugfix b/changelog.d/3692.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..f44e13dca15469517adc34fc4d37742b484f291e --- /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 7b36accdb6cacfabcaced2cfe97e0baf449172ec..7e417f811e9e281d253163ecc7d07ebddf402b5b 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 cfd37f3138d3ca77c10ed3aee1ee4784e3bd16e2..8c8b65e04ede690edad6cdd9f21484725a79ef1d 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 0d58dcebc52cc479216adc6652b876a196dee861..511acbde9bc25cd2262dcf35769cd5dffe892ec7 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"