Fix some tests which leaked logcontexts

pull/4204/head
Richard van der Hoff 2018-11-15 22:46:51 +00:00
parent f5faf6bc14
commit 884a561447
2 changed files with 4 additions and 3 deletions

View File

@ -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)