Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tests/components/recorder/test_migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ async def test_schema_update_calls(hass: HomeAssistant, recorder_db_url: str) ->

async def test_migration_in_progress(hass: HomeAssistant, recorder_db_url: str) -> None:
"""Test that we can check for migration in progress."""
if recorder_db_url.startswith("mysql://"):
# The database drop at the end of this test currently hangs on MySQL
# because the post migration is still in progress in the background
# which results in a deadlock in InnoDB. This behavior is not likely
# to happen in real life because the database does not get dropped
# in normal operation.
return

assert recorder.util.async_migration_in_progress(hass) is False

with patch("homeassistant.components.recorder.ALLOW_IN_MEMORY_DB", True), patch(
Expand Down