Skip to content

test(node): a_closing_pool_is_unfunded_to_its_lane_and_not_found_to_anyone_else flakes on its pool_closing counter #2682

Closed

Description

@thiras

crates/node/tests/client_loopback.rs — a_closing_pool_is_unfunded_to_its_lane_and_not_found_to_anyone_else failed once locally (full cargo nextest run --workspace) and passed on retry.

The failing assertion is the last one:

anyhow::ensure!(
    metric_line_present(&encoded, "decdn_serve_stream_rejected_pool_closing_total 2"),
    "both refusals must count as pool_closing:\n{encoded}"
);

Both requests drew their signed ok: false refusal, so the behavior under test held; only the counter read was short.

Likely cause: the test encodes the metrics as soon as the client has read the second refusal, but the server records the pool_closing reset reason when its serve_stream task ends, after the response is on the wire. On a loaded runner the client can win that race and see 1.

Suggested fix: poll the encoded metrics until the line shows 2 (bounded, e.g. 2 s), or await the server's handler completion before reading — the same pattern other loopback tests use for post-response counters.

Activity

  1. added
    kind:test
    prio:low
    area:node
    on Oct 28, 2026
  2. moved this from Backlog to In progress in deCDNon Oct 28, 2026
  3. added a commit that references this issue on Oct 28, 2026
    f2bc01c
  4. moved this from In progress to Done in deCDNon Oct 28, 2026
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

    area:nodekind:testprio:low

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions