forked-synapse/tests
Richard van der Hoff f22e7cda2c Fix a class of logcontext leaks
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`.
2018-05-02 11:58:00 +01:00
..
api use jsonschema.FormatChecker for RoomID and UserID strings 2017-03-23 11:42:41 -03:00
appservice Add extra space before inline comment 2017-11-16 18:22:40 +00:00
config Make tests py3 compatible 2018-04-16 00:39:32 +02:00
crypto Make tests py3 compatible 2018-04-16 00:39:32 +02:00
events Optimise state resolution 2017-01-17 13:22:19 +00:00
handlers Fix tests 2018-04-11 14:37:11 +01:00
metrics report metrics on number of cache evictions 2018-02-05 15:34:01 +00:00
replication s/replication_client/federation_client/ 2018-03-13 13:26:52 +00:00
rest Use six.moves.urlparse 2018-04-15 21:22:43 +02:00
storage Merge pull request #3103 from NotAFile/py3-baseexcepton-message 2018-04-20 15:34:49 +01:00
util Fix a class of logcontext leaks 2018-05-02 11:58:00 +01:00
__init__.py Fix flake8 warnings for tests 2016-02-19 15:34:38 +00:00
test_distributor.py Make tests py3 compatible 2018-04-16 00:39:32 +02:00
test_dns.py Remove address resolution of hosts in SRV records 2018-04-04 12:26:50 +02:00
test_preview.py Fix crash in url preview when html tag has no text 2016-12-14 22:38:18 +01:00
test_state.py Store state groups separately from events (#2784) 2018-02-06 14:31:24 +00:00
test_test_utils.py Fix flake8 warnings for tests 2016-02-19 15:34:38 +00:00
test_types.py Validate group ids when parsing 2017-10-21 00:30:39 +01:00
unittest.py enable twisted delayedcall debugging in UTs 2018-01-09 12:06:45 +00:00
utils.py Merge pull request #3108 from NotAFile/py3-six-urlparse 2018-04-30 00:33:05 +01:00