From 498528aad6a26ac312b2d591dc15354e0c2b6ee3 Mon Sep 17 00:00:00 2001 From: Yasir Ashfaq Date: Mon, 9 Feb 2026 09:06:58 +0530 Subject: [PATCH] =?UTF-8?q?tests:=20remove=20Big=20Endian=E2=80=93specific?= =?UTF-8?q?=20compressed=20size=20assertion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test previously hardcoded an expected compressed size for BIG_ENDIAN platforms. With recent changes to Snappy’s compression logic, the output size is now identical on both little-endian and big-endian systems, making the endianness-specific assertion invalid. Signed-off-by: Yasir Ashfaq --- src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java b/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java index 36ef552e..47c443d5 100755 --- a/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java +++ b/src/test/java/org/xerial/snappy/SnappyOutputStreamTest.java @@ -177,9 +177,7 @@ public void batchingOfWritesShouldNotAffectCompressedDataSize() byte[] expectedCompressedData = compressAsChunks(orig, Integer.MAX_VALUE); // Hardcoding an expected compressed size here will catch regressions that lower the // compression quality: - if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) - assertEquals(90992, expectedCompressedData.length); - else if(OSInfo.getArchName() == "aarch64") + if(OSInfo.getArchName() == "aarch64") // Arm has a better compression ratio assertEquals(91051, expectedCompressedData.length); else