perf(tests): заглушить форсайт-enqueue в analyze-тестах Site Finder #3502
No reviewers
Labels
No labels
Fable 5 ревью
GG-форсайт
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
feedback/max
generative
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
ИРД
вторичка
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#3502
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "perf/3471-tests-faster-sitefinder"
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?
Summary
analyze_parcel()в конце безусловно дёргаетforecast_site_finder_report.delay(...)(best-effort §22-форсайт enqueue,app/api/v1/parcels.py). В тестовой песочнице Celery-брокер (Redis) недоступен —.delay()синхронно ждёт kombu reconnect-backoff (~69с) прежде чем try/except его проглотит. Пауза общая для ВСЕХ тестов, дёргающихPOST /analyzeбез мока форсайт-таски — 32 теста в 9 файлахtests/api/v1/test_analyze_*.py+test_2464*.py, ~2218 из 2503с полного прогона (89%)._stub_forecast_enqueueвbackend/tests/api/v1/conftest.py, по образцу уже существующей_stub_zone_regulation_resolver— глушит.delayв no-opMagicMockдля всех тестов каталога. Тесты самого enqueue (test_parcels_forecast.py,test_run_history_and_response_contract.py) переопределяют тот же target своим per-testpatchповерх авто-фикстуры (nested mock-scope) — их проверки не затронуты.Test plan
ruff check backend/tests/api/v1/conftest.py— чистоИзвестный остаток (не в scope)
Два теста в целевом наборе всё ещё держат ~16с каждый —
test_analyze_market_price.py::test_market_price_invalid_cad_returns_404иtest_analyze_recent_permits.py::test_recent_permits_invalid_cad_no_regression. Похоже на отдельный неглушённый network/DB round-trip на invalid-cad ветке (НЕ форсайт-таска — она уже заглушена). Не трогал, отдельная причина — на усмотрение владельца.🤖 Generated with Claude Code
https://claude.ai/code/session_01JY6iWDnGDthdvsMWgK1BMG