test(rag): update test for Phase 4 coalescing state
This commit is contained in:
@@ -60,12 +60,17 @@ def test_rag_status_remains_error_after_sync_failure() -> None:
|
|||||||
status to 'ready' - a lie.
|
status to 'ready' - a lie.
|
||||||
"""
|
"""
|
||||||
from src.app_controller import AppController
|
from src.app_controller import AppController
|
||||||
|
import threading
|
||||||
# Construct a controller, bypassing the full __init__
|
# Construct a controller, bypassing the full __init__
|
||||||
ctrl = AppController.__new__(AppController)
|
ctrl = AppController.__new__(AppController)
|
||||||
ctrl.rag_config = MagicMock()
|
ctrl.rag_config = MagicMock()
|
||||||
ctrl.rag_config.enabled = True
|
ctrl.rag_config.enabled = True
|
||||||
ctrl.rag_engine = None
|
ctrl.rag_engine = None
|
||||||
ctrl.files = []
|
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
|
# Use a mock io_pool to capture the _task function
|
||||||
submitted_tasks = []
|
submitted_tasks = []
|
||||||
class MockFuture:
|
class MockFuture:
|
||||||
|
|||||||
Reference in New Issue
Block a user