infoxtractor/tests/integration
Dirk Riemann 050f80dcd7
All checks were successful
tests / test (push) Successful in 1m8s
tests / test (pull_request) Successful in 1m9s
feat(pg-queue): LISTEN ix_jobs_new + 10s fallback poll (spec §4)
PgQueueListener:
- Dedicated asyncpg connection outside the SQLAlchemy pool (LISTEN
  needs a persistent connection; pooled connections check in/out).
- Exposes wait_for_work(timeout) — resolves on NOTIFY or timeout,
  whichever fires first. The worker treats both wakes identically.
- asyncpg_dsn_from_sqlalchemy_url strips the +asyncpg driver segment
  and percent-decodes the password so the same URL in IX_POSTGRES_URL
  works for both SQLAlchemy and raw asyncpg.

app.py lifespan now also spawns the listener alongside the worker;
both are gated on spawn_worker=True so REST-only tests stay fast.

2 new integration tests: NOTIFY path (wake within 2 s despite 60 s
poll) + missed-NOTIFY path (fallback poll recovers within 5 s). 33
integration tests total, 209 unit. Forgejo Actions trigger is flaky;
local verification is the gate.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 11:52:26 +02:00
..
__init__.py fix(ci): create empty tests/integration so pytest doesn't error on missing dir 2026-04-18 10:39:26 +02:00
conftest.py feat(store): JobsRepo CRUD over ix_jobs + integration fixtures (spec §4) 2026-04-18 11:43:11 +02:00
test_jobs_repo.py feat(store): JobsRepo CRUD over ix_jobs + integration fixtures (spec §4) 2026-04-18 11:43:11 +02:00
test_pg_queue_adapter.py feat(pg-queue): LISTEN ix_jobs_new + 10s fallback poll (spec §4) 2026-04-18 11:52:26 +02:00
test_rest_adapter.py feat(rest): FastAPI adapter + /jobs, /healthz, /metrics routes (spec §5) 2026-04-18 11:47:04 +02:00
test_worker_loop.py feat(worker): async worker loop + one-shot callback delivery (spec §5) 2026-04-18 11:49:54 +02:00