From c446f2d2218b83c22ee03b0f6c130ccdb3372cb6 Mon Sep 17 00:00:00 2001 From: Jonas Konrad Date: Fri, 25 Sep 2026 20:04:23 +0200 Subject: [PATCH] Remove duplicate testAvailableAfterEmptyBlock #129 and c8ebf97 both added a testAvailableAfterEmptyBlock method to LZ4BlockStreamingTest, so the test sources no longer compile. Keep the one from #129; both check the same behaviour. Co-Authored-By: Claude Opus 5.5 --- .../jpountz/lz4/LZ4BlockStreamingTest.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java b/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java index 286be0b..46c94be 100644 --- a/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java +++ b/src/test/net/jpountz/lz4/LZ4BlockStreamingTest.java @@ -602,28 +602,4 @@ public void testManyEmptyBlocksSkip() throws IOException { assertEquals(-1, in.read()); in.close(); } - - @Test - public void testAvailableAfterEmptyBlock() throws IOException { - final byte[] data = randomArray(64, 256); - final byte[] bytes = compressBlockStream(data); - - LZ4BlockInputStream in = lz4BlockInputStreamBuilder().build(new ByteArrayInputStream(bytes)); - final byte[] actual = new byte[data.length]; - assertEquals(data.length, readFully(in, actual)); - assertArrayEquals(data, actual); - assertEquals(0, in.available()); - // reads the terminating empty block - assertEquals(-1, in.read()); - assertEquals(0, in.available()); - in.close(); - - in = lz4BlockInputStreamBuilder() - .withStopOnEmptyBlock(false) - .build(new ByteArrayInputStream(bytes)); - assertEquals(data.length, readFully(in, actual)); - assertEquals(-1, in.read()); - assertEquals(0, in.available()); - in.close(); - } }