Skip to content

Client lifecycle-hook cloning and send_streaming timeout enforcement lack tests (mutation survivors) #570

Description

@leynos

Context

From the first full mutation-testing run (ADR-007 workflow, 2026-07-04, partial). Two client-side survivors indicate plausible behavioural gaps; both need a confirming test (or a finding of existing coverage) before fixes.

Surviving mutants

  • src/client/hooks.rs:111replace <impl Clone for LifecycleHooks<C>>::clone -> Self with Default::default(). Default yields all-None hooks, so cloning on the pooled-reconnect path (src/client/connect_parts.rs:81) would silently drop configured callbacks. No test sets a hook, reconnects, and asserts the hook still fires.
  • src/client/send_streaming.rs:96replace SendStreamingConfig::timeout -> Option<Duration> with None. Disabling the timeout entirely passes the suite: existing timing tests assert success paths only, not that a too-short timeout aborts a slow stream. (The neighbouring chunk_size mutants are already caught by frame-count assertions.)

Suggested tests

  1. Configure on_connect (or another lifecycle hook), force a pool recycle/reconnect, and assert the callback fires on the new connection.
  2. Configure a very short send_streaming timeout against a deliberately slow body reader and assert the call returns TimedOut and stops emitting frames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmediumCould be disruptive, but might not happentesting

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions