summary refs log tree commit diff
path: root/tests/storage/test_database.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Make sqlite database migrations transactional again, part two (#14926)Sean Quah2023-01-311-0/+96
| | | | | | | | | | | | | | | | #14910 fixed the regression introduced by #13873 where sqlite database migrations would no longer run inside a transaction. However, it committed the transaction before Synapse updated its bookkeeping of which migrations have been run, which means that migrations may be run again after they have completed successfully. Leave the transaction open at the end of `executescript`, to restore the old, correct behaviour. Also make the PostgreSQL behaviour consistent with SQLite. Fixes #14909. Signed-off-by: Sean Quah <seanq@matrix.org>
* 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.
* Handle cancellation in `DatabasePool.runInteraction()` (#12199)Sean Quah2022-03-161-0/+58
| | | | | | | | | | | | To handle cancellation, we ensure that `after_callback`s and `exception_callback`s are always run, since the transaction will complete on another thread regardless of cancellation. We also wait until everything is done before releasing the `CancelledError`, so that logging contexts won't get used after they have been finished. Signed-off-by: Sean Quah <seanq@element.io>
* Add tests for database transaction callbacks (#12198)Sean Quah2022-03-151-1/+103
| | | | Signed-off-by: Sean Quah <seanq@element.io>
* Remove dead code in `tests/storage/test_database.py` (#12197)Sean Quah2022-03-091-16/+0
| | | Signed-off-by: Sean Quah <seanq@element.io>
* 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>`
* remove unused param on `make_tuple_comparison_clause`Richard van der Hoff2021-04-081-2/+1
|
* Drop support for sqlite<3.22 as wellRichard van der Hoff2021-04-081-11/+1
|
* bg update to clear out duplicate outbound_device_list_pokes (#7193)Richard van der Hoff2020-04-071-0/+52
We seem to have some duplicates, which could do with being cleared out.