Skip to content

test(quic): expand experimental/quic_server.cpp coverage to 80% line / 70% branch #1066

Description

@kcenon

What

Expand unit-test coverage of src/experimental/quic_server.cpp from 43.7% line / 17.5% branch to >= 80% line / >= 70% branch (per coverage.yml).

This file is a new target identified in the 2026-04-26 re-measurement; no prior narrow test-expansion sub-issue exists for it.

Why

Where

  • File: src/experimental/quic_server.cpp (~378 lcov-executable lines)
  • Tests: extend tests/test_messaging_quic_server.cpp (and add a focused fixture if needed)
  • Coverage workflow: .github/workflows/coverage.yml

How

Technical Approach

  1. Read quic_server.cpp / quic_server.h to enumerate accept-loop and error branches.
  2. Use the 2026-04-26 lcov report for uncovered lines/branches.
  3. Add tests for:
    • Connection acceptance failures (token validation, retry, version negotiation)
    • Per-connection error fan-out and shutdown ordering
    • Resource limits (max concurrent connections, stream caps)
    • Graceful shutdown with in-flight streams
  4. Use the existing in-process QUIC harness; no real UDP sockets.

Acceptance Criteria

  • src/experimental/quic_server.cpp line coverage >= 80%
  • src/experimental/quic_server.cpp branch coverage >= 70%
  • Tests pass on Ubuntu/macOS/Windows CI
  • Sanitizer builds (ASAN, TSAN, UBSAN) pass
  • Post-merge coverage delta recorded on Expand unit test coverage from 40% to 80% #953

Part of #953

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions