diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-11-15 22:46:51 +0000 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-02-13 15:16:04 +0000 |
commit | 3cda7da8276c89fb3cb151f0d2a8ed160ad24577 (patch) | |
tree | f4fa8dfa05e99043b78d4a3b5c10a5a78265b424 | |
parent | Fix logcontext leak in EmailPusher (diff) | |
download | synapse-3cda7da8276c89fb3cb151f0d2a8ed160ad24577.tar.xz |
Fix some tests which leaked logcontexts
-rw-r--r-- | tests/test_federation.py | 4 | ||||
-rw-r--r-- | tests/test_server.py | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_federation.py b/tests/test_federation.py index e1a34ccffd..1a5dc32c88 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -123,8 +123,8 @@ class MessageAcceptTests(unittest.TestCase): "test.serv", lying_event, sent_to_us_directly=True ) - # Step the reactor, so the database fetches come back - self.reactor.advance(1) + # Step the reactor, so the database fetches come back + self.reactor.advance(1) # on_receive_pdu should throw an error failure = self.failureResultOf(d) diff --git a/tests/test_server.py b/tests/test_server.py index f0e6291b7e..634a8fbca5 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -27,6 +27,7 @@ from synapse.api.errors import Codes, SynapseError from synapse.http.server import JsonResource from synapse.http.site import SynapseSite, logger from synapse.util import Clock +from synapse.util.logcontext import make_deferred_yieldable from tests import unittest from tests.server import FakeTransport, make_request, render, setup_test_homeserver @@ -95,7 +96,7 @@ class JsonResourceTests(unittest.TestCase): d = Deferred() d.addCallback(_throw) self.reactor.callLater(1, d.callback, True) - return d + return make_deferred_yieldable(d) res = JsonResource(self.homeserver) res.register_paths("GET", [re.compile("^/_matrix/foo$")], _callback) |