Skip to content

Flaky test: test_session_of_an_exited_worker_gets_an_explicit_error fails in its precondition #5433

Closed

Description

@AdamRajfer

tests/unit_tests/test_session_routing_e2e.py::test_session_of_an_exited_worker_gets_an_explicit_error failed once in CI and passed when the job was re-run on the same commit.

Where it failed: in its precondition, before the behaviour under test. The test seeds 200 sessions across the workers and expects them to land on more than one worker; the owners counter showed every session on a single worker, so the test stopped before the SIGKILL / 410 assertions.

Run: "Unit tests / Session routing end-to-end" on commit 8dce335 (PR #5072). The first attempt failed (job 124992055708) and the re-run of the failed jobs passed. The routing code and the test were not changed by that commit.

Likely cause: session placement across workers is not guaranteed to spread 200 sessions over more than one worker on a loaded runner, so the precondition depends on scheduling.

Possible fix: make the precondition deterministic, for example by retrying the seeding until at least two workers own sessions (with a bound), or by pinning sessions to workers explicitly, so the test exercises the exited-worker path every time instead of failing before it.

Similar to #5429.

Activity

  1. AdamRajfer commented on Nov 19, 2026

    @AdamRajfer
    ContributorAuthor

    Fixed on main since #5186, which reworked this test. It now seeds sessions through each worker's own socket, so the precondition no longer depends on scheduling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions