Skip to content

Eliminate test-suite flakiness (xdist worker crash, sleep-based readiness) #47

Description

@tschm

Subcategory: Test pass rate / flakiness
Score: 8 → 10 (target)

make test is flaky. During assessment the first invocation exited code 2 (pytest-xdist worker crash) mid-run; an immediate clean re-run passed 143/143. The suite spins up real background servers/threads and uses time.sleep(server_timeout) for readiness, which is inherently timing-sensitive under -n auto.

Suggested fix: mock the server/thread boundary where behavior (not integration) is under test, and replace fixed sleep-based readiness with polling/health-check waits; ensure per-worker port isolation.

Done when: make test passes 10 consecutive runs with no worker crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions