Skip to content

fix: compile transport_internal_test.go against the klauspost gzip reader - #25

Merged
bogdanfinn merged 1 commit into
bogdanfinn:masterfrom
burruplambert:fix/internal-test-klauspost-gzip
Sep 2, 2026
Merged

fix: compile transport_internal_test.go against the klauspost gzip reader#25
bogdanfinn merged 1 commit into
bogdanfinn:masterfrom
burruplambert:fix/internal-test-klauspost-gzip

Conversation

@burruplambert

Copy link
Copy Markdown

Summary

Since #19 switched response decompression to klauspost/compress, gzipReader.zr is a *klauspost gzip.Reader. The sentinel in TestGzipReaderUnreadableBodyReturnsReaderToPool (added in #23) is still built with the standard library gzip package, so the two PRs together left the package tests uncompilable on master:

transport_internal_test.go:520:17: invalid operation: next.zr == sentinel (mismatched types *"github.com/klauspost/compress/gzip".Reader and *"compress/gzip".Reader)

One line: import the klauspost gzip package in the test instead. All TestGzipReader* tests pass again with go test -run TestGzipReader .

…ader

Since #19 switched response decompression to klauspost/compress, gzipReader.zr
is a *klauspost gzip.Reader, but the sentinel in
TestGzipReaderUnreadableBodyReturnsReaderToPool (added in #23) is still built
with the standard library gzip package, so the package tests no longer compile:

    transport_internal_test.go:520:17: invalid operation: next.zr == sentinel (mismatched types *"github.com/klauspost/compress/gzip".Reader and *"compress/gzip".Reader)

Import the klauspost gzip package in the test instead.
@bogdanfinn

Copy link
Copy Markdown
Owner

@burruplambert thank you very much. i already fixed that locally after merging your change. But thanks for taking the time and providing a PR for the fix aswell.

@bogdanfinn
bogdanfinn merged commit 228dbfb into bogdanfinn:master Sep 2, 2026
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