[claude] Fix 10 vassal tests flaky under xdist parallel execution (#1243) #1245
Reference in New Issue
Block a user
Delete Branch "claude/issue-1243"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #1243
Root cause
10 tests in
test_vassal_agent_health.pyandtest_vassal_orchestration_loop.pytimed out at 30s undertox -e unit(pytest-xdist parallel execution).The tests called
check_agent_health(),get_full_health_report(), andrun_cycle()without mockingconfig.settings. Sincegitea_enabled=Trueby default and the Gitea token is loaded from.timmy_gitea_token, real HTTP connections were attempted:httpx.AsyncClient(timeout=15)— up to 15s per callurllib.request.urlopen(timeout=5)inget_system_snapshot— up to 5s per callWith 14 xdist workers all making simultaneous network calls, the 30s per-test timeout was exceeded.
Fix
config.settingswithgitea_enabled=False/gitea_token=""in each affected test →fetch_open_issues()andcheck_agent_health()bail out immediately without any HTTP callstimmy.vassal.house_health.get_system_snapshot→ avoids the Ollama probe inrun_cycletests_disabled_settings()and_fast_snapshot()helper functions to reduce repetitionAfter the fix: all 435 unit tests pass in 16.4s (well under the 30s budget).