What
Expand unit-test coverage of src/protocols/http2/http2_server.cpp from 38.3% line / 19.4% branch to >= 80% line / >= 70% branch (per coverage.yml).
Existing tests in tests/test_http2_server.cpp (added via #992) cover happy paths only; this issue adds error-path and branch-coverage tests.
Why
Where
- File:
src/protocols/http2/http2_server.cpp (~554 lcov-executable lines)
- Tests: extend
tests/test_http2_server.cpp
- Coverage workflow:
.github/workflows/coverage.yml
How
Technical Approach
- Read
http2_server.cpp / http2_server.h to enumerate handler entry points and error branches.
- Use the 2026-04-26 lcov report for uncovered lines/branches.
- Add tests for:
- Connection preface validation failures
- Frame parse errors (malformed HEADERS, unexpected SETTINGS, oversize PUSH_PROMISE)
- Flow-control window violations and PROTOCOL_ERROR paths
- Stream-state machine transitions (idle → reserved → half-closed → closed)
- Use the in-process loopback transport; no network mocks.
Acceptance Criteria
Part of #953
What
Expand unit-test coverage of
src/protocols/http2/http2_server.cppfrom 38.3% line / 19.4% branch to >= 80% line / >= 70% branch (percoverage.yml).Existing tests in
tests/test_http2_server.cpp(added via #992) cover happy paths only; this issue adds error-path and branch-coverage tests.Why
Part of #953— project-wide coverage push to 80%/70%.Where
src/protocols/http2/http2_server.cpp(~554 lcov-executable lines)tests/test_http2_server.cpp.github/workflows/coverage.ymlHow
Technical Approach
http2_server.cpp/http2_server.hto enumerate handler entry points and error branches.Acceptance Criteria
src/protocols/http2/http2_server.cppline coverage >= 80%src/protocols/http2/http2_server.cppbranch coverage >= 70%Part of #953