Skip to content

Commit 4db5de2

Browse files
authored
ci: exercise the full public API in the release smoke test (#67)
* ci: exercise the full public API in the release smoke test Since each smoke leg pays for a fresh runner/container spin-up, expand what one run verifies instead of adding more legs. Smoke.java now touches essentially every public entry point in the zstd module: - version/sizing info, core + bounded decompress, zero-copy decompressedSize(MemorySegment) - deterministic error paths (undersized buffer -> DST_SIZE_TOO_SMALL, corrupted checksum trailer -> CHECKSUM_WRONG) - ZstdFrame introspection (byte[] and MemorySegment overloads) and skippable frames - ZstdCompressContext/ZstdDecompressContext: parameters, all reset directives, sizeOf(), prefix (delta) compression - all 6 dictionary training variants, digested compress/decompress dictionaries (every constructor), refDictionary - zero-copy streaming (ZstdCompressStream/ZstdDecompressStream, progress()) and java.io streaming (ZstdOutputStream/ZstdInputStream, withPledgedSize) - ZstdBounds for every compress/decompress parameter, ZstdErrorCode descriptions Deliberately excludes multithreaded compression (NB_WORKERS > 0): the bundled native library is single-threaded, so exercising it would only prove the parameter is a no-op. Compiled and run locally against a fresh build (zstd-0.7.jar + zstd-native-osx-aarch64-0.7.jar) before pushing. * ci: dedupe round-trip helpers and narrow smoke test scope Two follow-ups from review on #67: - Extract shared helpers for the compress/decompress round-trip patterns that were copy-pasted across zeroCopyContextCompression, streamingZeroCopy, and streamingIo (plain vs. dictionary variants), and collapse the repeated check(Arrays.equals(...), msg) pattern into a checkArrayEquals helper used throughout. - Narrow scope: this file's job is proving the released native artifact loads and links on this specific OS/arch/libc, and that off-heap MemorySegment interop and native struct layouts (streaming buffers, frame progression) work there — not re-deriving full API correctness, which the module's JUnit suite already covers more thoroughly with precise single-platform failures. Dropped the parameterBounds()/errorCodeDescriptions() enum sweeps, the 6-way dictionary-training-variant sweep, dictionaryIdApi()'s pure-Java record assertions, and the redundant dictionary-attachment/overload permutations (per-call vs. sticky vs. MemorySegment vs. digested vs. refDictionary), keeping one representative path per category. Cuts the file from ~610 to ~390 lines. Compiled and ran locally against zstd-0.7.jar + zstd-native-osx-aarch64-0.7.jar.
1 parent d7cd2aa commit 4db5de2

1 file changed

Lines changed: 361 additions & 25 deletions

File tree

0 commit comments

Comments
 (0)