fix(test): apply NETWORK_COVERAGE_TIMEOUT_MULTIPLIER at explicit wait_for call sites (#1112)#1114
Merged
Merged
Conversation
…_for call sites (#1112)
Contributor
Coverage Report
Coverage DetailsFull HTML report is available as a build artifact. |
This was referenced May 8, 2026
Closed
kcenon
added a commit
that referenced
this pull request
May 8, 2026
Closes #1115 Pivot http2_client dispatcher branch tests to friend-injected process_frame to bypass the SETTINGS-handshake wait_for path. PR #1114 (Round 5 multiplier) was structurally bounded by the ctest 300 s timeout under coverage build; direct injection collapses the 15.175 s wall-clock to 0 ms. - Add http2_client_test_access friend class gated by NETWORK_ENABLE_TEST_INJECTION - Refactor 7 Server* dispatcher TEST_F to call process_frame directly - Production header byte-identical when BUILD_TESTS=OFF - 14 connect-state TEST_F genuinely require connection state, retained on multiplier scaffold Post-merge verification: Coverage Analysis workflow on develop measures delta vs PR #1109 baseline (LH/LF=108/576, BRH/BRF=97/979). Acceptance gate per #1115 is >=+20pp line / >=+10pp branch on http2_client.cpp. Part of #953 coverage expansion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Apply
NETWORK_COVERAGE_TIMEOUT_MULTIPLIERat the 24 explicitwait_for(..., std::chrono::seconds(3))call sites intests/unit/http2_client_branch_test.cpp, plus themake_connected_clientdefaultrequest_timeout = std::chrono::milliseconds(2000)parameter. Nosrc/changes. No new TEST_F. No fixture changes.Change Type
Why
PR #1113 (Round 4) introduced the multiplier to the fixture default-arg path but left the explicit-timeout call sites unscaled. Round-5 diagnosis (latest comment on #1112) confirmed ROOT_CAUSE 3 (Excluded call sites still trapping) with high confidence:
tests/support/hermetic_transport_fixture.hheader docstring explicitly states: "Callers passing an explicit timeout should multiply by NETWORK_COVERAGE_TIMEOUT_MULTIPLIER themselves at the call site."http2_client_branch_test.cppall pass an explicitstd::chrono::seconds(3)literal -- so the multiplier never applies, and they trap at literal 3s under coverage instrumentation (observed 5.1-5.4s handshake completion in workflow run 25558218320).make_connected_clientdefaultrequest_timeout = std::chrono::milliseconds(2000)is also literal, so the http2_client request timeout fires before tests can observe success under coverage.Result: PR #1113 merged green in Debug/Release but produced 0pp coverage delta on
src/protocols/http2/http2_client.cpp(still 18.75% line / 9.91% branch, byte-identical LH/LF/BRH/BRF pre vs post).Related Issues
Where
tests/unit/http2_client_branch_test.cppseconds(3)+ 1ms(2000)default arg)Affected call sites (lines pre-edit)
std::chrono::seconds(3)->std::chrono::seconds(3) * NETWORK_COVERAGE_TIMEOUT_MULTIPLIERat lines:633, 672, 744, 768, 793, 816, 848, 883, 907, 928, 948, 978, 1013, 1041, 1082, 1283, 1309, 1379, 1412, 1441, 1472, 1502, 1532, 1567 (24 sites).
request_timeout = std::chrono::milliseconds(2000)default arg inmake_connected_clientat line 722 -> scaled by multiplier (1 site).The runtime
client->set_timeout(std::chrono::milliseconds(2000))at line 661 is intentionally untouched -- it configures the http2_client itself in a single-test scope and is not a wait budget.How
Implementation
std::chrono::seconds(3)becomesstd::chrono::seconds(3) * NETWORK_COVERAGE_TIMEOUT_MULTIPLIER.#include "hermetic_transport_fixture.h"(line 36) which defines it with default value1and is overridden to5bytests/support/CMakeLists.txtunderNETWORK_COVERAGE_BUILD.Testing
src/protocols/http2/http2_client.cppversus the pre-merge sha. The PR landing here is necessary but not sufficient; a separate cron-triggered coverage workflow run will verify Round-5 success.Breaking Changes
None.
Rollback
git revert-- test file only.Closes #1112