forked-synapse/tests/util
Sean Quah 7ff22d6da4
Fix LruCache corruption bug with a size_callback that can return 0 (#11454)
When all entries in an `LruCache` have a size of 0 according to the
provided `size_callback`, and `drop_from_cache` is called on a cache
node, the node would be unlinked from the LRU linked list but remain in
the cache dictionary. An assertion would be later be tripped due to the
inconsistency.

Avoid unintentionally calling `__len__` and use a strict `is None`
check instead when unwrapping the weak reference.
2021-11-30 16:28:02 +00:00
..
caches Additional test for cachedList (#11246) 2021-11-04 14:45:34 +00:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_async_helpers.py ObservableDeferred: run observers in order (#11229) 2021-11-02 00:17:35 +00:00
test_batching_queue.py Rewrite the KeyRing (#10035) 2021-06-02 16:37:59 +01:00
test_dict_cache.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_expiring_cache.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_file_consumer.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_glob_to_regex.py Merge pull request from GHSA-x345-32rc-8h85 2021-05-11 11:47:23 +02:00
test_itertools.py Use inline type hints in tests/ (#10350) 2021-07-13 11:52:58 +01:00
test_linearizer.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_logcontext.py Record more information into structured logs. (#9654) 2021-04-08 08:01:14 -04:00
test_logformatter.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_lrucache.py Fix LruCache corruption bug with a size_callback that can return 0 (#11454) 2021-11-30 16:28:02 +00:00
test_ratelimitutils.py Use direct references for configuration variables (part 4). (#10893) 2021-09-23 12:03:01 -04:00
test_retryutils.py Don't hammer the database for destination retry timings every ~5mins (#10036) 2021-05-21 17:57:08 +01:00
test_rwlock.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_stream_change_cache.py Update black, and run auto formatting over the codebase (#9381) 2021-02-16 22:32:34 +00:00
test_stringutils.py Change the format of access tokens away from macaroons (#5588) 2021-05-12 15:04:51 +01:00
test_threepids.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
test_treecache.py Remove keylen from LruCache. (#9993) 2021-05-24 14:02:01 +01:00
test_wheel_timer.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00