Skip to content

Commit 2901df6

Browse files
committed
Conditionally skip for sqlite
1 parent 20aead6 commit 2901df6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test_app/tests/lib/utils/test_db.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
import pytest
55

6+
from django.db import connection
7+
68
from ansible_base.lib.utils.db import advisory_lock, migrations_are_complete
79

810

@@ -27,6 +29,8 @@ def background_task(django_db_blocker):
2729

2830
@pytest.mark.django_db
2931
def test_determine_lock_is_held(django_db_blocker):
32+
if connection.vendor == 'sqlite':
33+
pytest.skip('Advisory lock is not written for sqlite')
3034
thread = threading.Thread(target=background_task, args=(django_db_blocker,))
3135
thread.start()
3236
for _ in range(5):

0 commit comments

Comments
 (0)