fix(tests): resolve nox unit_tests timeout for agent_skills_loader and skill_search features #9456
+5
-3
@@ -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",
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user