summary refs log tree commit diff
path: root/tests/util/test_linearizer.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-06-22 09:37:10 +0100
committerGitHub <noreply@github.com>2018-06-22 09:37:10 +0100
commit77ac14b960cb8daef76062ce85fc0427749b48af (patch)
tree4a2b3af0e0404640a2ef251030cd3c2591a1d6ba /tests/util/test_linearizer.py
parentPopulate synapse_federation_client_sent_pdu_destinations:count again (#3386) (diff)
downloadsynapse-77ac14b960cb8daef76062ce85fc0427749b48af.tar.xz
Pass around the reactor explicitly (#3385)
Diffstat (limited to 'tests/util/test_linearizer.py')
-rw-r--r--tests/util/test_linearizer.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/util/test_linearizer.py b/tests/util/test_linearizer.py
index 4865eb4bc6..bf7e3aa885 100644
--- a/tests/util/test_linearizer.py
+++ b/tests/util/test_linearizer.py
@@ -12,10 +12,11 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-from synapse.util import async, logcontext
+
+from synapse.util import logcontext, Clock
 from tests import unittest
 
-from twisted.internet import defer
+from twisted.internet import defer, reactor
 
 from synapse.util.async import Linearizer
 from six.moves import range
@@ -53,7 +54,7 @@ class LinearizerTestCase(unittest.TestCase):
                     self.assertEqual(
                         logcontext.LoggingContext.current_context(), lc)
                     if sleep:
-                        yield async.sleep(0)
+                        yield Clock(reactor).sleep(0)
 
                 self.assertEqual(
                     logcontext.LoggingContext.current_context(), lc)