summary refs log tree commit diff
path: root/tests/storage/test__base.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Correctly mention previous copyright (#16820)Erik Johnston2024-01-231-0/+1
| | | | | During the migration the automated script to update the copyright headers accidentally got rid of some of the existing copyright lines. Reinstate them.
* Update license headersPatrick Cloke2023-11-211-11/+16
|
* Convert simple_select_list and simple_select_list_txn to return lists of ↵Patrick Cloke2023-10-261-8/+8
| | | | | tuples (#16505) This should use fewer allocations and improves type hints.
* Require types in tests.storage. (#14646)Patrick Cloke2022-12-091-1/+1
| | | | Adds missing type hints to `tests.storage` package and does not allow untyped definitions.
* Optimise `_update_client_ips_batch_txn` to batch together database ↵reivilibre2022-04-081-16/+57
| | | | | operations. (#12252) Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
* Add type hints to some tests files (#12371)Dirk Klimpel2022-04-051-3/+11
|
* Remove `HomeServer.get_datastore()` (#12031)Richard van der Hoff2022-02-231-1/+1
| | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733
* Remove various bits of compatibility code for Python <3.6 (#9879)Andrew Morgan2021-04-271-1/+2
| | | I went through and removed a bunch of cruft that was lying around for compatibility with old Python versions. This PR also will now prevent Synapse from starting unless you're running Python 3.6+.
* Remove redundant "coding: utf-8" lines (#9786)Jonathan de Jong2021-04-141-1/+0
| | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
* Combine the two sets of tests for CacheDescriptorRichard van der Hoff2020-10-211-228/+0
|
* Combine the two sets of DeferredCache testsRichard van der Hoff2020-10-141-72/+0
|
* move DeferredCache into its own moduleRichard van der Hoff2020-10-141-1/+2
|
* Rename Cache->DeferredCacheRichard van der Hoff2020-10-141-5/+5
|
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-9/+9
|
* Rename database classes to make some sense (#8033)Erik Johnston2020-08-051-8/+8
|
* Allow configuration of Synapse's cache without using synctl or environment ↵Amber Brown2020-05-111-4/+4
| | | | variables (#6391)
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-2/+2
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Move DB pool and helper functions into dedicated Database classErik Johnston2019-12-051-8/+8
|
* Remove underscore from SQLBaseStore functionsErik Johnston2019-12-041-4/+4
|
* Make ObservableDeferred.observe() always return deferred.Erik Johnston2019-10-301-1/+1
| | | | | | | This makes it easier to use in an async/await world. Also fixes a bug where cache descriptors would occaisonally return a raw value rather than a deferred.
* UPSERT many functionality (#4644)Amber Brown2019-02-201-0/+88
|
* Run black.black2018-08-101-4/+1
|
* Rename async to async_helpers because `async` is a keyword on Python 3.7 (#3678)Amber Brown2018-08-101-1/+1
|
* run isortAmber Brown2018-07-091-4/+4
|
* Update testErik Johnston2017-07-041-1/+1
|
* Fix up testsErik Johnston2017-03-301-1/+1
|
* Speed up cache size calculationErik Johnston2017-01-171-1/+5
| | | | | | | | | | | Instead of calculating the size of the cache repeatedly, which can take a long time now that it can use a callback, instead cache the size and update that on insertion and deletion. This requires changing the cache descriptors to have two caches, one for pending deferreds and the other for the actual values. There's no reason to evict from the pending deferreds as they won't take up any more memory.
* Ensure invalidation list does not grow unboundedlyErik Johnston2016-08-191-0/+48
|
* Rename to on_invalidateErik Johnston2016-08-191-2/+2
|
* Make cache_context an explicit optionErik Johnston2016-08-191-2/+2
|
* Remove lru optionErik Johnston2016-08-191-1/+1
|
* Add concept of cache contextsErik Johnston2016-08-191-0/+66
|
* Fix flake8 warnings for testsMark Haines2016-02-191-3/+5
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Move all the caches into their own package, synapse.util.cachesErik Johnston2015-08-111-1/+1
|
* Change Cache to not use *args in its interfaceErik Johnston2015-08-071-6/+6
|
* Make @cached cache deferreds rather than the deferreds' valuesErik Johnston2015-08-061-4/+7
|
* Caches should be bound to instances.Erik Johnston2015-06-031-35/+49
| | | | | Before, caches were global and so different instances of the stores would share caches. This caused problems in the unit tests.
* Allow a choice of LRU behaviour for Cache() by using LruCache() or OrderedDict()Paul "LeoNerd" Evans2015-03-251-0/+22
|
* Unit-test that Cache() key eviction is orderedPaul "LeoNerd" Evans2015-03-251-0/+18
|
* Pull out the cache logic from the @cached wrapper into its own class we can ↵Paul "LeoNerd" Evans2015-03-201-1/+33
| | | | reuse
* Use cache.pop() instead of a separate membership test + del []Paul "LeoNerd" Evans2015-02-231-0/+7
|
* Allow @cached-wrapped functions to have a prefill method for setting entriesPaul "LeoNerd" Evans2015-02-231-0/+14
|
* Take named arguments to @cached() decorator, add a 'max_entries' limitPaul "LeoNerd" Evans2015-02-191-0/+89