fix(exec): yield long-running commands by default (NAN-328) (#6385)

* fix(exec): yield long-running commands by default (NAN-328)

* test(exec): avoid waiting for already observed output

* test(exec): observe hard-timeout cleanup before asserting completion
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-22 13:27:26 +08:00
1 parent 421bd6b593
commit 26e1f41a00
14 files changed
+164 -49

No files matched your search

+1
View File
@@ -181,6 +181,7 @@ async def test_direct_process_preserves_arguments_and_output_limit(tmp_path):
async def test_direct_process_timeout(tmp_path):
result = await ExecTool(working_dir=str(tmp_path)).execute(
command=[sys.executable, "-c", "import time; time.sleep(20)"], timeout=1,
yield_time_ms=5000,
)
assert "Reason: max_runtime" in result
assert "Exit code:" in result