diff --git a/tests/test_rag_phase4_stress.py b/tests/test_rag_phase4_stress.py index c12d5d4..b287fee 100644 --- a/tests/test_rag_phase4_stress.py +++ b/tests/test_rag_phase4_stress.py @@ -70,7 +70,17 @@ def test_rag_large_codebase_verification_sim(live_gui): (workspace_dir / "file_25.txt").write_text("MODIFIED CONTENT FOR FILE 25. SEARCH FOR THIS.") client.click('btn_rebuild_rag_index') - time.sleep(2) # Wait for it to finish + + # Wait for 'ready' + success = False + for _ in range(50): + status = client.get_value('rag_status') + if status == 'ready': + success = True + break + time.sleep(0.5) + assert success, f"Incremental re-indexing timed out. Final status: {status}" + print("[SIM] Incremental re-indexing SUCCESS.") # 6. Verify retrieval of modified content client.set_value('current_provider', 'gemini_cli')