summary refs log tree commit diff
path: root/tests/util/test_linearizer.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-07-04 00:07:04 +1000
committerGitHub <noreply@github.com>2019-07-04 00:07:04 +1000
commit463b072b1290a8cb75bc1d7b6688fa76bbfdb14f (patch)
treeb3b3f1807e74ff1aa23f48384c4d64a165975131 /tests/util/test_linearizer.py
parentFix 'utime went backwards' errors on daemonization. (#5609) (diff)
downloadsynapse-463b072b1290a8cb75bc1d7b6688fa76bbfdb14f.tar.xz
Move logging utilities out of the side drawer of util/ and into logging/ (#5606)
Diffstat (limited to 'tests/util/test_linearizer.py')
-rw-r--r--tests/util/test_linearizer.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/util/test_linearizer.py b/tests/util/test_linearizer.py
index ec7ba9719c..0ec8ef90ce 100644
--- a/tests/util/test_linearizer.py
+++ b/tests/util/test_linearizer.py
@@ -19,7 +19,8 @@ from six.moves import range
 from twisted.internet import defer, reactor
 from twisted.internet.defer import CancelledError
 
-from synapse.util import Clock, logcontext
+from synapse.logging.context import LoggingContext
+from synapse.util import Clock
 from synapse.util.async_helpers import Linearizer
 
 from tests import unittest
@@ -51,13 +52,13 @@ class LinearizerTestCase(unittest.TestCase):
 
         @defer.inlineCallbacks
         def func(i, sleep=False):
-            with logcontext.LoggingContext("func(%s)" % i) as lc:
+            with LoggingContext("func(%s)" % i) as lc:
                 with (yield linearizer.queue("")):
-                    self.assertEqual(logcontext.LoggingContext.current_context(), lc)
+                    self.assertEqual(LoggingContext.current_context(), lc)
                     if sleep:
                         yield Clock(reactor).sleep(0)
 
-                self.assertEqual(logcontext.LoggingContext.current_context(), lc)
+                self.assertEqual(LoggingContext.current_context(), lc)
 
         func(0, sleep=True)
         for i in range(1, 100):