What
Expand unit-test coverage of src/protocols/http2/http2_client.cpp from 18.8% line / 9.9% branch to the project targets of >= 80% line / >= 70% branch, as measured by the existing coverage.yml workflow.
The file has ~576 executable lines (lcov). Existing tests in tests/test_http2_client.cpp (added via #991) cover happy paths only; this issue adds error-path and branch-coverage tests.
Why
Where
- File:
src/protocols/http2/http2_client.cpp (~1181 raw LOC, 576 lcov-executable)
- Tests: extend
tests/test_http2_client.cpp (do not fork a parallel suite)
- Coverage workflow:
.github/workflows/coverage.yml (all BUILD_WITH_* flags ON, branch coverage via lcov --rc lcov_branch_coverage=1)
How
Technical Approach
- Read
http2_client.cpp / http2_client.h to enumerate public API and error branches.
- Use the 2026-04-26 lcov report to identify uncovered lines/branches.
- Add tests targeting:
- Error paths (connection failures, frame parse errors, GOAWAY, RST_STREAM handling)
- Boundary cases (max frame size, flow-control window edges, stream-ID exhaustion, header-table eviction triggered from client side)
- State-machine transitions on closed/half-closed streams
- Reuse existing fixtures and the in-process loopback transport — do not mock the network stack.
Acceptance Criteria
Part of #953
What
Expand unit-test coverage of
src/protocols/http2/http2_client.cppfrom 18.8% line / 9.9% branch to the project targets of >= 80% line / >= 70% branch, as measured by the existingcoverage.ymlworkflow.The file has ~576 executable lines (lcov). Existing tests in
tests/test_http2_client.cpp(added via #991) cover happy paths only; this issue adds error-path and branch-coverage tests.Why
Part of #953— project-wide coverage push to 80% line / 70% branch.Result<T>migration or framing logic would not be caught by CI.Where
src/protocols/http2/http2_client.cpp(~1181 raw LOC, 576 lcov-executable)tests/test_http2_client.cpp(do not fork a parallel suite).github/workflows/coverage.yml(allBUILD_WITH_*flags ON, branch coverage vialcov --rc lcov_branch_coverage=1)How
Technical Approach
http2_client.cpp/http2_client.hto enumerate public API and error branches.Acceptance Criteria
src/protocols/http2/http2_client.cppline coverage >= 80%src/protocols/http2/http2_client.cppbranch coverage >= 70%Part of #953