summary refs log tree commit diff
path: root/tests/util/caches
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2021-04-08 08:01:14 -0400
committerGitHub <noreply@github.com>2021-04-08 08:01:14 -0400
commit48d44ab1425ffac721b7d407823c2315cda1929a (patch)
treebb8c741b7bf163c911ed57880a5e84547c260f9b /tests/util/caches
parentDon't report anything from GaugeBucketCollector metrics until data is present... (diff)
downloadsynapse-48d44ab1425ffac721b7d407823c2315cda1929a.tar.xz
Record more information into structured logs. (#9654)
Records additional request information into the structured logs,
e.g. the requester, IP address, etc.
Diffstat (limited to 'tests/util/caches')
-rw-r--r--tests/util/caches/test_descriptors.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/util/caches/test_descriptors.py b/tests/util/caches/test_descriptors.py
index afb11b9caf..e434e21aee 100644
--- a/tests/util/caches/test_descriptors.py
+++ b/tests/util/caches/test_descriptors.py
@@ -661,14 +661,13 @@ class CachedListDescriptorTestCase(unittest.TestCase):
 
             @descriptors.cachedList("fn", "args1")
             async def list_fn(self, args1, arg2):
-                assert current_context().request == "c1"
+                assert current_context().name == "c1"
                 # we want this to behave like an asynchronous function
                 await run_on_reactor()
-                assert current_context().request == "c1"
+                assert current_context().name == "c1"
                 return self.mock(args1, arg2)
 
-        with LoggingContext() as c1:
-            c1.request = "c1"
+        with LoggingContext("c1") as c1:
             obj = Cls()
             obj.mock.return_value = {10: "fish", 20: "chips"}
             d1 = obj.list_fn([10, 20], 2)