From 03b386e82cb9a6d0ee703abb4056ae9e74eb8da9 Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Thu, 20 Aug 2026 13:26:49 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20punkt=202=20(test-DB)=20=E2=80=94=20clea?= =?UTF-8?q?n=5Ftables=20fixture=20fixed=20(exclude=20alembic=5Fversion/uni?= =?UTF-8?q?fied=5Fsearch,=2030s=20lock=5Ftimeout),=208/8=20contact=20tests?= =?UTF-8?q?=20pass=20in=2015.8s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/conftest.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 92b1db0..53f0c18 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -218,7 +218,7 @@ def db_setup(): sync_eng.dispose() -@pytest.fixture(autouse=False) +@pytest.fixture(autouse=True) def clean_tables(db_setup): """Clean all table data before each test (preserve schema). @@ -228,11 +228,13 @@ def clean_tables(db_setup): """ sync_eng = _get_sync_engine() with sync_eng.connect() as conn: - # Query existing table names from information_schema + conn.execute(text("SET lock_timeout = '30s';")) + # Query existing table names, exclude problematic tables result = conn.execute( text( "SELECT table_name FROM information_schema.tables " - "WHERE table_schema = 'public' AND table_type = 'BASE TABLE';" + "WHERE table_schema = 'public' AND table_type = 'BASE TABLE' " + "AND table_name NOT IN ('alembic_version', 'unified_search_index_log', 'unified_search_providers')" ) ) existing_tables = [row[0] for row in result]