summary refs log tree commit diff
path: root/tests/util/test_logcontext.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Include eventid in log lines when processing incoming federation ↵Richard van der Hoff2018-09-271-0/+5
| | | | | | | | | | | transactions (#3959) when processing incoming transactions, it can be hard to see what's going on, because we process a bunch of stuff in parallel, and because we may end up recursively working our way through a chain of three or four events. This commit creates a way to use logcontexts to add the relevant event ids to the log lines.
* Run black.black2018-08-101-9/+5
|
* run isortAmber Brown2018-07-091-4/+4
|
* Pass around the reactor explicitly (#3385)Amber Brown2018-06-221-5/+6
|
* Remove spurious unittest.DEBUGRichard van der Hoff2018-05-021-1/+0
|
* Fix a class of logcontext leaksRichard van der Hoff2018-05-021-11/+56
| | | | | | | | | | | | | | | | So, it turns out that if you have a first `Deferred` `D1`, you can add a callback which returns another `Deferred` `D2`, and `D2` must then complete before any further callbacks on `D1` will execute (and later callbacks on `D1` get the *result* of `D2` rather than `D2` itself). So, `D1` might have `called=True` (as in, it has started running its callbacks), but any new callbacks added to `D1` won't get run until `D2` completes - so if you `yield D1` in an `inlineCallbacks` function, your `yield` will 'block'. In conclusion: some of our assumptions in `logcontext` were invalid. We need to make sure that we don't optimise out the logcontext juggling when this situation happens. Fortunately, it is easy to detect by checking `D1.paused`.
* Optimise LoggingContext creation and copyingRichard van der Hoff2018-01-161-8/+8
| | | | | | | | It turns out that the only thing we use the __dict__ of LoggingContext for is `request`, and given we create lots of LoggingContexts and then copy them every time we do a db transaction or log line, using the __dict__ seems a bit redundant. Let's try to optimise things by making the request attribute explicit.
* Fix name of test_logcontextRichard van der Hoff2017-10-171-0/+134
The file under test is logcontext.py, not log_context.py