Skip to content

test(quic): expand quic_server.cpp coverage to 70%/50% #1123

Description

@kcenon

What

Expand unit test coverage for experimental/quic_server.cpp from current 43.7% line / 17.5% branch to >=70% line / >=50% branch.

Part of #953.

Why

  • File is 378 LOC. Experimental QUIC server is a newer addition with less mature test coverage.
  • v1.0 readiness gate requires >=80% line coverage ecosystem-wide (see Prepare network_system for v1.0 release #964) — applies even to experimental modules included in default build.

Where

  • Source: experimental/quic_server.cpp (378 LOC)
  • Tests: tests/unit/experimental/ (or new dedicated test file)

How

Approach

  1. Audit existing quic_server tests for uncovered branches.
  2. Add tests for error paths: handshake failures, certificate validation errors, 0-RTT rejection, connection migration failures.
  3. Add tests for boundary cases: max concurrent connections, address validation token expiry, retry packet emission.
  4. Add tests for streaming: bidirectional streams, stream resets, flow-control window updates.
  5. Re-run coverage workflow to verify thresholds met.

Acceptance Criteria

  • experimental/quic_server.cpp line coverage >= 70%
  • experimental/quic_server.cpp branch coverage >= 50%
  • All new tests pass on Ubuntu/macOS/Windows CI
  • All sanitizer builds (ASAN, TSAN, UBSAN) pass
  • Coverage workflow re-measurement attached as a comment on this issue

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions