Skip to content

Auto-port 5.0: Codec-compression: Add Snappy frame decompressor - #17160

Merged
chrisvest merged 1 commit into
5.0from
auto-port-pr-17153-to-5.0
Jul 28, 2026
Merged

chrisvest merged 1 commit into
5.0from
auto-port-pr-17153-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17153 to 5.0
Cherry-picked commit: a3f0fca


Motivation:

The decompressor API migration tracked in #16743 is being split into small, reviewable PRs. Snappy is one of the remaining per-format decompressor implementations.

Modification:

  • Add SnappyFrameDecompressor based on the existing Snappy frame decoder behavior.
  • Add SnappyDecompressorTest using the shared decompressor contract test suite.
  • Cover Snappy-specific malformed frame cases for too-short chunks and truncated input at EOF.

Result:

Snappy can be decompressed through the new Decompressor API while preserving frame-decoder validation behavior.

Verification:

  • JAVA_HOME=/usr/lib/jvm/java-21-openjdk MAVEN_USER_HOME=/tmp/opencode/m2-compress-snappy ./mvnw -pl codec-compression -am -Dtest=SnappyDecompressorTest -Dsurefire.failIfNoSpecifiedTests=false test
  • JAVA_HOME=/usr/lib/jvm/java-21-openjdk MAVEN_USER_HOME=/tmp/opencode/m2-compress-snappy ./mvnw -pl codec-compression -am verify

Part of #16743.

Motivation:

The decompressor API migration tracked in #16743 is being split into
small, reviewable PRs. Snappy is one of the remaining per-format
decompressor implementations.

Modification:

- Add `SnappyFrameDecompressor` based on the existing Snappy frame
decoder behavior.
- Add `SnappyDecompressorTest` using the shared decompressor contract
test suite.
- Cover Snappy-specific malformed frame cases for too-short chunks and
truncated input at EOF.

Result:

Snappy can be decompressed through the new `Decompressor` API while
preserving frame-decoder validation behavior.

Verification:

- `JAVA_HOME=/usr/lib/jvm/java-21-openjdk
MAVEN_USER_HOME=/tmp/opencode/m2-compress-snappy ./mvnw -pl
codec-compression -am -Dtest=SnappyDecompressorTest
-Dsurefire.failIfNoSpecifiedTests=false test`
- `JAVA_HOME=/usr/lib/jvm/java-21-openjdk
MAVEN_USER_HOME=/tmp/opencode/m2-compress-snappy ./mvnw -pl
codec-compression -am verify`

Part of #16743.

---------

Co-authored-by: multicode <[email protected]>
Co-authored-by: Chris Vest <[email protected]>
(cherry picked from commit a3f0fca)
@testlens-app

testlens-app Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

🚨 TestLens detected 1 failed test 🚨

Here is what you can do:

  1. Inspect the test failures carefully.
  2. If you are convinced that some of the tests are flaky, you can mute them below.
  3. Finally, trigger a rerun by checking the rerun checkbox.

Test Summary

Build PR / macos-x86_64-java25-boringssl build > Netty/Transport/Native/KQueue

Test Runs Flakiness
KQueueDatagramUnicastIPv6MappedTest > testSimpleSendDirectByteBuf(TestInfo) ❌ 2% 🟡

🏷️ Commit: 64ae20d
▶️ Tests: 30309 executed
⚪️ Checks: 12/12 completed

Test Failures

KQueueDatagramUnicastIPv6MappedTest > testSimpleSendDirectByteBuf(TestInfo) (Netty/Transport/Native/KQueue in Build PR / macos-x86_64-java25-boringssl build)
org.opentest4j.AssertionFailedError
	at io.netty.testsuite.transport.socket.DatagramUnicastTest.testSimpleSend0(DatagramUnicastTest.java:360)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest.testSimpleSend(DatagramUnicastTest.java:192)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest.testSimpleSendDirectByteBuf(DatagramUnicastTest.java:89)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest$1.run(DatagramUnicastTest.java:82)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest$1.run(DatagramUnicastTest.java:79)
	at io.netty.testsuite.transport.AbstractComboTestsuiteTest.run(AbstractComboTestsuiteTest.java:52)
	at io.netty.testsuite.transport.socket.DatagramUnicastTest.testSimpleSendDirectByteBuf(DatagramUnicastTest.java:79)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)

Muted Tests

Select tests to mute in this pull request:

  • KQueueDatagramUnicastIPv6MappedTest > testSimpleSendDirectByteBuf(TestInfo)

Reuse successful test results:

  • ♻️ Only rerun the tests that failed or were muted before

Click the checkbox to trigger a rerun:

  • Rerun jobs

Learn more about TestLens at testlens.app.

@chrisvest chrisvest added this to the 5.0.0.Final milestone Jul 28, 2026
@chrisvest
chrisvest merged commit 41a0f66 into 5.0 Jul 28, 2026
12 of 13 checks passed
@chrisvest
chrisvest deleted the auto-port-pr-17153-to-5.0 branch July 28, 2026 15:16
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.

3 participants