Skip to content

Harden flaky bounded-concurrency timing test #136

Description

@shanev

Problem

During full-suite validation for #130, tests/test_runner_subcall_reporting.py::test_llm_batch_with_errors_bounded_concurrency observed peak == 1 while asserting peak == 2. An immediate isolated rerun passed. The production batch result was correct; the test relies on time.sleep(0.02) being long enough for two worker threads to overlap, which is scheduler-sensitive on a loaded machine.

Direction

Replace the sleep-only overlap assumption with deterministic synchronization (for example, a barrier/event that holds the first two admitted requests until both are active), while retaining the upper-bound assertion and avoiding a deadlock if the executor regresses to one worker.

Evidence

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