| test: speed up unit tests and fix macOS path failures
Reduce total unit test runtime from ~571s to ~240s (58% faster).
Slow test fixes:
- test_lsp_rail: remove fake event loop mock that caused 20s timeout in
run_coroutine_threadsafe; let asyncio.get_running_loop raise naturally
so LspRail.init falls through to the asyncio.run() fast path
- test_task_manager: reduce asyncio.sleep from 10s to 0.5s; cancellation
semantics are unchanged
- test_end: inject END_COMP_TEMPLATE_RENDER_POSITION_TIMEOUT_KEY=50ms via
create_workflow_session(envs=...) instead of relying on the 5s default
- test_http_component: mock aiohttp.TCPConnector + ClientSession to avoid
real network calls; assert connector created 3 times to verify the
session-closed bug fix still holds
- test_remote_agent: lower request_timeout from 5s to 0.1s in the
adapter-exception test where the adapter fails immediately
- test_orchestrator: patch run_learnings with a noop async generator to
prevent LspRail deadlock via run_coroutine_threadsafe
Bug fixes:
- http_request_component: process_response called content.decode('utf-8')
on content already decoded to str; handle both str and bytes
- test_bash_tool, test_filesystem_tools, test_file_op_history: use
os.path.realpath() in assertions to resolve macOS /var -> /private/var
symlinks that caused startswith and dict-membership checks to fail
| 10 天前 |