fix(tests): resolve nox unit_tests timeout for agent_skills_loader and skill_search features #9456

Merged
HAL9000 merged 1 commits from fix/agent-skills-unit-tests-timeout into master 2026-04-15 08:36:56 +00:00
2 changed files with 17 additions and 4 deletions
+5 -3
View File
@@ -173,8 +173,9 @@ def unit_tests(session: nox.Session):
behave_cmd = session.bin + "/behave-parallel"
parallel_args = _behave_parallel_args(session.posargs)
# If a specific feature file is passed, run only that file
if session.posargs and session.posargs[0].endswith(".feature"):
# If specific feature files are passed, run only those files
has_feature_files = any(arg.endswith(".feature") for arg in session.posargs)
if has_feature_files:
args = [
behave_cmd,
"-q",
@@ -562,7 +563,8 @@ def coverage_report(session: nox.Session):
# Build behave-parallel args (sequential for coverage).
behave_cmd = session.bin + "/behave-parallel"
if session.posargs and session.posargs[0].endswith(".feature"):
has_feature_files = any(arg.endswith(".feature") for arg in session.posargs)
if has_feature_files:
behave_args = [
behave_cmd,
"-q",
+12 -1
View File
@@ -337,7 +337,18 @@ def main(argv: list[str] | None = None) -> None:
start = time.monotonic()
if processes <= 1 or coverage_mode or len(feature_paths) == 1:
# Run sequentially if:
# - processes <= 1 (explicitly requested)
# - coverage_mode (slipcover requires single process)
# - only 1 feature file (no parallelism benefit)
# - very few feature files relative to processes (fork overhead > benefit)
# When feature_paths <= 2, sequential is faster and avoids fork deadlocks
if (
processes <= 1
or coverage_mode
or len(feature_paths) == 1
or len(feature_paths) <= 2
):
# ---- sequential in-process mode ----
_, total = _run_features_inprocess(feature_paths, other_args)
else: