Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions airflow/utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,7 @@ def check_migrations(timeout):
:param timeout: Timeout for the migration in seconds
:return: None
"""
timeout = timeout or 1 # run the loop at least 1
with _configured_alembic_environment() as env:
context = env.get_context()
source_heads = None
Expand Down
1 change: 1 addition & 0 deletions tests/utils/test_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def test_default_connections_sort(self):

def test_check_migrations(self):
# Should run without error. Can't easily test the behaviour, but we can check it works
check_migrations(0)
check_migrations(1)

@mock.patch('alembic.command')
Expand Down