Skip to content

Run HTTP/2 integration tests against local Caddy instead of nghttp2.org#482

Merged
ericmj merged 2 commits intomainfrom
ericmj/local-h2c-integration-tests
Apr 16, 2026
Merged

Run HTTP/2 integration tests against local Caddy instead of nghttp2.org#482
ericmj merged 2 commits intomainfrom
ericmj/local-h2c-integration-tests

Conversation

@ericmj
Copy link
Copy Markdown
Member

@ericmj ericmj commented Apr 16, 2026

The tests hitting nghttp2.org/httpbin/ had been failing on every CI run because the upstream httpbin backend behind nghttpx returns 502 to GitHub Actions runners. Enable h2c on the Caddy docker service (via a new HTTPBIN_H2C_PORT, default 8081, since the existing HTTPBIN_HTTP_PORT mapping goes directly to httpbin), point the TCP h2c test at it, and drop the duplicate "nghttp2.org/httpbin" describe block (ping and GET are already covered by the local "httpbin.org" block).

The tests hitting nghttp2.org/httpbin/ had been failing on every CI run
because the upstream httpbin backend behind nghttpx returns 502 to
GitHub Actions runners. Enable h2c on the Caddy docker service (via a
new HTTPBIN_H2C_PORT, default 8081, since the existing HTTPBIN_HTTP_PORT
mapping goes directly to httpbin), point the TCP h2c test at it, and
drop the duplicate "nghttp2.org/httpbin" describe block (ping and GET
are already covered by the local "httpbin.org" block).
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 16, 2026

Coverage Report for CI Build 0

Coverage decreased (-0.1%) to 87.636%

Details

  • Coverage decreased (-0.1%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 2 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

2 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
lib/mint/http2.ex 1 93.75%
lib/mint/http2/frame.ex 1 99.02%

Coverage Stats

Coverage Status
Relevant Lines: 1472
Covered Lines: 1290
Line Coverage: 87.64%
Coverage Strength: 248.64 hits per line

💛 - Coveralls

The twitter.com describe block was using @moduletag instead of
@describetag, which made its connect: {"twitter.com", 443} tag apply
to the whole module. That caused the top-level setup to open an HTTPS
connection to twitter.com even for tests outside the describe (like
the TCP h2c test), and the SSL socket's SETTINGS frame would land in
the test mailbox. The previous test had a swallow-hack comment about
"SSL messages sneaking in"; this removes the root cause.
end
end

describe "nghttp2.org/httpbin" do
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests duplicated mint code paths already covered by the "httpbin.org" describe block (local Caddy over HTTPS/h2): HTTP2.ping/1 and HTTP2.request/5.

@ericmj ericmj marked this pull request as ready for review April 16, 2026 17:22
@ericmj ericmj merged commit 2a78a5b into main Apr 16, 2026
3 checks passed
@ericmj ericmj deleted the ericmj/local-h2c-integration-tests branch April 16, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants