[Tests] test_job_recovery dispatcher tests need a Redis on 127.0.0.1:6379 #6
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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
Three tests in
tests/test_job_recovery.pyfail on a clean checkout because they reach for a real Redis that is not running:test_download_dispatcher_claims_one_media_slottest_download_dispatcher_reschedules_after_body_errortest_download_dispatcher_reschedules_when_lock_is_held_elsewhereAll three fail with the same error:
The tests are not exercising the dispatcher logic — they are blocked at the very first Redis
connect()call.Reproduction
No Redis is required to be running.
tests/conftest.pysetsREDIS_URL=redis://127.0.0.1:0/0(database 0 on a hypothetical local Redis), but these particular tests evidently bypass that and try127.0.0.1:6379directly.Impact
uv run pytestis red on a fresh checkout. CI presumably works because it spins up Redis as a service, but a developer running tests locally without a Redis installed hits 3 spurious failures and is left wondering if the dispatcher is broken.Suggested direction (out of scope here)
fakeredis(already a transitive dep in some places) or a real local Redis started by the test fixture, so the dispatcher is exercised without a sidecar.pytest.mark.skipif(not redis_available, ...)so they only run when Redis is reachable.Out of scope for #5
This is purely a pre-existing test-infra issue. It is being filed separately so the seed-demo PR (and any other PR) can pass
uv run pytestcleanly on a clean checkout.Closing — this is expected outside Docker
Confirmed: these tests rely on a real Redis sidecar, which only exists in the Docker dev stack (
docker compose up -d db redis). On a bare-metal checkout without Redis running, the 3ConnectionRefusedErrorfailures are expected and not a bug.Closing in favor of documenting this expectation. No code change needed in this PR.