Background
The unit module shares fixtures via ZstdTestSupport / generators, but the integration-tests module is a separate Maven module and can't see those package-private test classes. So its three test files re-implement the same helpers:
random(Random, int) and compressible(Random, int) byte generators
- the compression-levels array
{min, 1, default, max}
Seen in:
integration-tests/.../it/ZstdJniInteropTest.java (e.g. payloadsAndLevels() ~L34-45)
integration-tests/.../it/ZstdInteropExtrasTest.java
integration-tests/.../it/GoldenCorpusTest.java
Task
Introduce one small package-private helper class in integration-tests/src/test/java/io/github/dfa1/zstd/it/ (e.g. ItTestSupport) holding the shared random/compressible/levels generators, and have the three test classes use it.
Note: keep it inside the integration-tests module — do not try to reuse the unit module's ZstdTestSupport (that would require publishing a test-jar, which is out of scope here).
Acceptance criteria
- The duplicated generators live in one place; the three test files call it.
./mvnw -pl integration-tests test stays green.
Pointers
integration-tests/src/test/java/io/github/dfa1/zstd/it/
Background
The unit module shares fixtures via
ZstdTestSupport/ generators, but the integration-tests module is a separate Maven module and can't see those package-private test classes. So its three test files re-implement the same helpers:random(Random, int)andcompressible(Random, int)byte generators{min, 1, default, max}Seen in:
integration-tests/.../it/ZstdJniInteropTest.java(e.g.payloadsAndLevels()~L34-45)integration-tests/.../it/ZstdInteropExtrasTest.javaintegration-tests/.../it/GoldenCorpusTest.javaTask
Introduce one small package-private helper class in
integration-tests/src/test/java/io/github/dfa1/zstd/it/(e.g.ItTestSupport) holding the sharedrandom/compressible/levelsgenerators, and have the three test classes use it.Note: keep it inside the integration-tests module — do not try to reuse the unit module's
ZstdTestSupport(that would require publishing atest-jar, which is out of scope here).Acceptance criteria
./mvnw -pl integration-tests teststays green.Pointers
integration-tests/src/test/java/io/github/dfa1/zstd/it/