diff options
author | Neil Johnson <neil@matrix.org> | 2018-08-17 13:58:40 +0100 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2018-08-17 13:58:40 +0100 |
commit | 9fd161c6fb93d2ab2d297e5190e1faaebbd7c892 (patch) | |
tree | f0439ed7a668a2b0d627b78aaab25b03a2fb6514 /tests | |
parent | server limits config docs (diff) | |
parent | Merge branch 'develop' into neilj/limit_exceeded_error (diff) | |
download | synapse-9fd161c6fb93d2ab2d297e5190e1faaebbd7c892.tar.xz |
Merge branch 'neilj/limit_exceeded_error' of github.com:matrix-org/synapse into neilj/limit_exceeded_error
Diffstat (limited to 'tests')
-rw-r--r-- | tests/storage/test_monthly_active_users.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/storage/test_monthly_active_users.py b/tests/storage/test_monthly_active_users.py index 511acbde9b..f2ed866ae7 100644 --- a/tests/storage/test_monthly_active_users.py +++ b/tests/storage/test_monthly_active_users.py @@ -75,6 +75,19 @@ class MonthlyActiveUsersTestCase(tests.unittest.TestCase): active_count = yield self.store.get_monthly_active_count() self.assertEquals(active_count, user_num) + # Test that regalar users are removed from the db + ru_count = 2 + yield self.store.upsert_monthly_active_user("@ru1:server") + yield self.store.upsert_monthly_active_user("@ru2:server") + active_count = yield self.store.get_monthly_active_count() + + self.assertEqual(active_count, user_num + ru_count) + self.hs.config.max_mau_value = user_num + yield self.store.reap_monthly_active_users() + + active_count = yield self.store.get_monthly_active_count() + self.assertEquals(active_count, user_num) + @defer.inlineCallbacks def test_can_insert_and_count_mau(self): count = yield self.store.get_monthly_active_count() |