summary refs log tree commit diff
path: root/tests/util/test_linearizer.py
diff options
context:
space:
mode:
authorWill Hunt <will@half-shot.uk>2018-08-16 01:13:05 +0100
committerWill Hunt <will@half-shot.uk>2018-08-16 01:13:05 +0100
commitb3e005de18d8cc0d871f3f4f4bbfee4d2eca9c24 (patch)
treef2e43f102010ea827fd94e54c79f3036b53f9539 /tests/util/test_linearizer.py
parentisorted this mess (diff)
parentMerge pull request #3686 from matrix-org/rav/changelog_links_to_prs (diff)
downloadsynapse-b3e005de18d8cc0d871f3f4f4bbfee4d2eca9c24.tar.xz
Merge remote-tracking branch 'upstream/develop' into hs/upload-limits
Diffstat (limited to 'tests/util/test_linearizer.py')
-rw-r--r--tests/util/test_linearizer.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/util/test_linearizer.py b/tests/util/test_linearizer.py

index 4729bd5a0a..61a55b461b 100644 --- a/tests/util/test_linearizer.py +++ b/tests/util/test_linearizer.py
@@ -20,13 +20,12 @@ from twisted.internet import defer, reactor from twisted.internet.defer import CancelledError from synapse.util import Clock, logcontext -from synapse.util.async import Linearizer +from synapse.util.async_helpers import Linearizer from tests import unittest class LinearizerTestCase(unittest.TestCase): - @defer.inlineCallbacks def test_linearizer(self): linearizer = Linearizer() @@ -54,13 +53,11 @@ class LinearizerTestCase(unittest.TestCase): def func(i, sleep=False): with logcontext.LoggingContext("func(%s)" % i) as lc: with (yield linearizer.queue("")): - self.assertEqual( - logcontext.LoggingContext.current_context(), lc) + self.assertEqual(logcontext.LoggingContext.current_context(), lc) if sleep: yield Clock(reactor).sleep(0) - self.assertEqual( - logcontext.LoggingContext.current_context(), lc) + self.assertEqual(logcontext.LoggingContext.current_context(), lc) func(0, sleep=True) for i in range(1, 100):