diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2020-10-16 15:51:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-16 15:51:57 +0100 |
commit | 3ee17585cd095e590096683395cfb9a017eac15e (patch) | |
tree | 65ada1e25106be58ddba381f366c48c4ce4e5d91 /tests/util | |
parent | Fix modifying events in `ThirdPartyRules` modules (#8564) (diff) | |
download | synapse-3ee17585cd095e590096683395cfb9a017eac15e.tar.xz |
Make LruCache register its own metrics (#8561)
rather than have everything that instantiates an LruCache manage metrics separately, have LruCache do it itself.
Diffstat (limited to 'tests/util')
-rw-r--r-- | tests/util/test_lrucache.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/util/test_lrucache.py b/tests/util/test_lrucache.py index 0adb2174af..f12834edab 100644 --- a/tests/util/test_lrucache.py +++ b/tests/util/test_lrucache.py @@ -59,7 +59,7 @@ class LruCacheTestCase(unittest.HomeserverTestCase): self.assertEquals(cache.pop("key"), None) def test_del_multi(self): - cache = LruCache(4, 2, cache_type=TreeCache) + cache = LruCache(4, keylen=2, cache_type=TreeCache) cache[("animal", "cat")] = "mew" cache[("animal", "dog")] = "woof" cache[("vehicles", "car")] = "vroom" @@ -160,7 +160,7 @@ class LruCacheCallbacksTestCase(unittest.HomeserverTestCase): m2 = Mock() m3 = Mock() m4 = Mock() - cache = LruCache(4, 2, cache_type=TreeCache) + cache = LruCache(4, keylen=2, cache_type=TreeCache) cache.set(("a", "1"), "value", callbacks=[m1]) cache.set(("a", "2"), "value", callbacks=[m2]) |