Merge pull request #566 from matrix-org/erikj/logcontext

Don't bother copying records on parent context
This commit is contained in:
Erik Johnston 2016-02-10 11:41:45 +00:00
commit e557dc80b8
2 changed files with 14 additions and 25 deletions

View file

@ -5,6 +5,7 @@ from .. import unittest
from synapse.util.async import sleep
from synapse.util.logcontext import LoggingContext
class LoggingContextTestCase(unittest.TestCase):
def _check_test_key(self, value):
@ -17,15 +18,6 @@ class LoggingContextTestCase(unittest.TestCase):
context_one.test_key = "test"
self._check_test_key("test")
def test_chaining(self):
with LoggingContext() as context_one:
context_one.test_key = "one"
with LoggingContext() as context_two:
self._check_test_key("one")
context_two.test_key = "two"
self._check_test_key("two")
self._check_test_key("one")
@defer.inlineCallbacks
def test_sleep(self):
@defer.inlineCallbacks