Skip to content

Mutation testing: testkit slow_io pacing survivors #599

Description

@leynos

Context

From the first complete full mutation-testing run (ADR-007 shared workflow, run 29074771985, 2026-07-10, main @ 94a5d44). The public testkit::slow_io pacing utility ships to consumers, so its validation boundaries and pacing behaviour warrant direct tests.

Surviving mutants

  • src/testkit/slow_io.rs:105replace > with >= in SlowIoConfig::validate
  • src/testkit/slow_io.rs:123replace > with >= in validate_pacing_chunk_size
  • src/testkit/slow_io.rs:138replace && with || in pause_between_chunks
  • src/testkit/slow_io.rs:164replace < with <= in write_with_optional_pacing

Analysis

Validation is only tested strictly beyond its limits, never at them, and no test measures the pacing schedule itself, so the pause-gating conjunction and the final-chunk comparison can be flipped freely.

Suggested tests

  1. Assert a configuration with capacity exactly at the maximum validates successfully (kills line 105).
  2. Assert chunk_size == capacity is accepted (kills line 123).
  3. Under tokio::time::pause (start-paused), perform a paced write spanning several chunks and assert the total virtual delay equals (chunks - 1) * delay — pauses between chunks but not after the last (kills lines 138 and 164).

Metadata

Metadata

Assignees

No one assigned

    Labels

    mediumCould be disruptive, but might not happentesting

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions