1
0
mirror of https://github.com/elisspace/core.git synced 2026-09-01 17:04:05 +00:00
Files
core/tests/components
Stefan Agner 89eed9c31e Allow to lock SQLite database during backup (#60874)
* Allow to set CONF_DB_URL

This is useful for test which need a custom DB path.

* Introduce write_lock_db helper to lock SQLite database

* Introduce Websocket API which allows to lock database during backup

* Fix isort

* Avoid mutable default arguments

* Address pylint issues

* Avoid holding executor thread

* Set unlock event in case timeout occures

This makes sure the database is left unlocked even in case of a race
condition.

* Add more unit tests

* Address new pylint errors

* Lower timeout to speedup tests

* Introduce queue overflow test

* Unlock database if necessary

This makes sure that the test runs through in case locking actually
succeeds (and the test fails).

* Make DB_LOCK_TIMEOUT a global

There is no good reason for this to be an argument. The recorder needs
to pick a sensible value.

* Add Websocket Timeout test

* Test lock_database() return

* Update homeassistant/components/recorder/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Fix format

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-12-09 12:07:41 +01:00
..
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-12-03 08:51:30 -08:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-29 20:00:39 -05:00
2021-11-01 20:47:05 -07:00
2021-11-04 10:07:50 -05:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-29 14:01:03 -08:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-10-14 10:03:38 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-18 21:44:45 -08:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-21 17:35:51 +01:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-25 18:21:39 -06:00
2021-10-14 10:03:38 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-12-07 12:54:15 -08:00
2021-11-01 20:47:05 -07:00
2021-11-18 15:56:22 -08:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00
2021-11-01 20:47:05 -07:00