mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Skip db locking test with postgresql/MySQL (#87760)
* Skip db locking test with postgresql/MySQL https://github.com/home-assistant/core/pull/87756#issuecomment-1423828389 * switch to the guards instead
This commit is contained in:
parent
f5b651750c
commit
483b0cd017
@ -1532,6 +1532,10 @@ async def test_database_lock_and_unlock(
|
||||
tmp_path,
|
||||
):
|
||||
"""Test writing events during lock getting written after unlocking."""
|
||||
if recorder_db_url.startswith(("mysql://", "postgresql://")):
|
||||
# Database locking is only used for SQLite
|
||||
return
|
||||
|
||||
if recorder_db_url == "sqlite://":
|
||||
# Use file DB, in memory DB cannot do write locks.
|
||||
recorder_db_url = "sqlite:///" + str(tmp_path / "pytest.db")
|
||||
@ -1577,6 +1581,10 @@ async def test_database_lock_and_overflow(
|
||||
tmp_path,
|
||||
):
|
||||
"""Test writing events during lock leading to overflow the queue causes the database to unlock."""
|
||||
if recorder_db_url.startswith(("mysql://", "postgresql://")):
|
||||
# Database locking is only used for SQLite
|
||||
return
|
||||
|
||||
# Use file DB, in memory DB cannot do write locks.
|
||||
if recorder_db_url == "sqlite://":
|
||||
# Use file DB, in memory DB cannot do write locks.
|
||||
|
Loading…
x
Reference in New Issue
Block a user