Skip to content

test: udp early-wheel-fire eviction test depends on wall-clock timing and fails under load #1619

Closed

Description

@FlorentinDUBOIS

udp::tests::an_early_wheel_fire_still_evicts_the_idle_flow fails under host load with its own precondition:

panicked at lib/src/udp.rs:2330:9:
the fire must land before the flow's deadline for this test to mean anything

Seen while gating #1618 on the merge result with main 46204814, at LOAD1 ≈ 28. The same test passed 3 times out of 3 in isolation on main right afterwards, and #1618 does not touch UDP.

The test relies on wall-clock time: the timer wheel has to fire before the flow deadline. When the process is descheduled, that ordering cannot be guaranteed, so the test turns inconclusive and panics instead of checking the eviction.

Suggested fix

Drive the wheel and the flow deadline from an injected or simulated clock instead of Instant::now(). The precondition then holds by construction, and the test keeps checking what it is named after. Do not loosen the assertion.

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