diff --git a/local_backend/tests/conftest.py b/local_backend/tests/conftest.py index 2df81a6..ab1b670 100644 --- a/local_backend/tests/conftest.py +++ b/local_backend/tests/conftest.py @@ -67,6 +67,16 @@ def pytest_collection_modifyitems(config, items): # ── venue time ────────────────────────────────────────────────────────────── +@pytest.fixture(autouse=True) +def _no_event_persistence(monkeypatch): + """services.ws_bus writes every broadcast to sync_events through its OWN connection, + which waits on the test's open transaction until SQLite's 5 s lock timeout (and then + fails quietly). Tests don't use the replay buffer, so the write is skipped here. + Tests about events capture services.sse_bus.broadcast_sync instead.""" + import services.ws_bus as ws_bus + monkeypatch.setattr(ws_bus, "_persist_event", lambda *a, **k: 0) + + @pytest.fixture(autouse=True) def _venue_time(): """Every test runs in Europe/Athens with rollover 06:00 (D-11), venue language "en"