From 4a7c978f69dc072eb022f2af929fe7136e30ed44 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 7 Apr 2022 15:36:58 +0200 Subject: [PATCH] Speedup recorder test test_write_lock_db (#69578) --- tests/components/recorder/test_util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/components/recorder/test_util.py b/tests/components/recorder/test_util.py index 1464a4ea58f..9372740c9bb 100644 --- a/tests/components/recorder/test_util.py +++ b/tests/components/recorder/test_util.py @@ -568,7 +568,9 @@ async def test_write_lock_db(hass, tmp_path): from sqlalchemy.exc import OperationalError # Use file DB, in memory DB cannot do write locks. - config = {recorder.CONF_DB_URL: "sqlite:///" + str(tmp_path / "pytest.db")} + config = { + recorder.CONF_DB_URL: "sqlite:///" + str(tmp_path / "pytest.db?timeout=0.1") + } await async_init_recorder_component(hass, config) await hass.async_block_till_done()