test: golden-corpus + zstd-jni interop coverage#3
Merged
Conversation
Drive zstd's own vendored corpus (third_party/zstd/tests/) from the integration-tests module: round-trip golden-compression inputs across the FFM/JNI boundary both directions, cross-check golden-decompression frames against the zstd-jni reference, and assert golden-decompression-errors frames are rejected. Submodule-gated so shallow clones still build. Fix CLAUDE.md: the integration reference is zstd-jni plus the golden corpus, not "the Rust reference". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add ZstdInteropExtrasTest covering interop paths the round-trip suite missed: checksum trailers (write/verify both directions + corruption rejection), skippable frames (jni stream skips a java-written one), multi-frame concatenation (streaming decode of joined frames both ways), foreign frame-header parsing (content size and dict id from jni frames), and streaming driven one tiny chunk at a time across a payload spread. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dfa1
added a commit
that referenced
this pull request
Jun 26, 2026
…tinels (#22) Follow-ups from the code-quality inspection: - Thread-safety docs (#2): document the four streams as not thread-safe (confine to one thread) and the two digested dictionaries as immutable and safe to share across threads. - Null validation (#3): fail fast with a named NullPointerException on public byte[]/dictionary/sample/stream arguments instead of an opaque NPE deep in native code. requireNative now also rejects null, covering every MemorySegment entry point. - Sentinel DRY (#4): one definition of CONTENTSIZE_UNKNOWN/_ERROR in Zstd, reused by ZstdFrame and ZstdFrameHeader (drops a duplicate and the CONTENT_SIZE_ERROR naming drift). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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
Two new integration-test files plus a CLAUDE.md correction.
GoldenCorpusTestDrives zstd's own vendored corpus under
third_party/zstd/tests/(canonical, version-matched fixtures from the submodule):Submodule-gated (walks up for the dir, empty stream if absent), so shallow clones still build.
ZstdInteropExtrasTestCloses interop gaps the round-trip suite missed:
CLAUDE.md
Fix stale claim: the integration reference is zstd-jni (luben, the zstd C library via JNI) plus the golden corpus — not "the Rust reference".
Test
./mvnw -pl integration-tests -am test— 32 new tests green, checkstyle clean.🤖 Generated with Claude Code