Skip to content

test(http2): expand http2_server.cpp coverage to 70%/50% #1121

Description

@kcenon

What

Expand unit test coverage for protocols/http2/http2_server.cpp from current 38.3% line / 19.4% branch to >=70% line / >=50% branch.

Part of #953.

Why

Where

  • Source: protocols/http2/http2_server.cpp (554 LOC)
  • Tests: tests/unit/protocols/http2/

How

Approach

  1. Audit existing http2_server tests for uncovered branches.
  2. Add tests for error paths: malformed client requests, GOAWAY initiation, RST_STREAM emission, stream ID exhaustion.
  3. Add tests for boundary cases: max concurrent streams, server push, header table updates, settings frame interleaving.
  4. Add tests for protocol violations: invalid pseudo-headers, header compression errors, flow-control violations.
  5. Re-run coverage workflow to verify thresholds met.

Acceptance Criteria

  • protocols/http2/http2_server.cpp line coverage >= 70%
  • protocols/http2/http2_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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions