Private
Public Access
0
0

test(rag): update test for Phase 4 coalescing state

This commit is contained in:
2026-06-09 17:10:33 -04:00
parent 5656957622
commit e7da7e0d6a
@@ -60,12 +60,17 @@ def test_rag_status_remains_error_after_sync_failure() -> None:
status to 'ready' - a lie.
"""
from src.app_controller import AppController
import threading
# Construct a controller, bypassing the full __init__
ctrl = AppController.__new__(AppController)
ctrl.rag_config = MagicMock()
ctrl.rag_config.enabled = True
ctrl.rag_engine = None
ctrl.files = []
# Phase 4 coalescing state (added by test_infrastructure_hardening_20260609)
ctrl._rag_sync_token = 0
ctrl._rag_sync_dirty = False
ctrl._rag_sync_lock = threading.Lock()
# Use a mock io_pool to capture the _task function
submitted_tasks = []
class MockFuture: