synapse/tests/util
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
..
caches Fix overzealous cache invalidation 2018-04-05 16:24:04 +01:00
__init__.py Fix flake8 warnings for tests 2016-02-19 15:34:38 +00:00
test_dict_cache.py Make get_state_groups_from_groups faster. 2017-05-17 15:12:15 +01:00
test_expiring_cache.py Add ExpiringCache tests 2017-01-16 15:33:34 +00:00
test_file_consumer.py Make tests py3 compatible 2018-04-16 00:39:32 +02:00
test_limiter.py Add Limiter: limit concurrent access to resource 2016-11-10 16:29:51 +00:00
test_linearizer.py Make tests py3 compatible 2018-04-16 00:39:32 +02:00
test_logcontext.py Fix a class of logcontext leaks 2018-05-02 11:58:00 +01:00
test_lrucache.py Tidy up test 2017-01-17 11:50:18 +00:00
test_rwlock.py Add ReadWriteLock 2016-07-05 15:23:17 +01:00
test_snapshot_cache.py Fix up tests 2017-03-30 14:14:46 +01:00
test_treecache.py Add a test for TreeCache.__contains__ 2016-02-22 15:22:38 +00:00
test_wheel_timer.py Add wheeltimer impl 2016-02-17 14:29:28 +00:00