yihua commented on code in PR #12866:
URL: https://github.com/apache/hudi/pull/12866#discussion_r2105549194


##########
hudi-io/src/test/java/org/apache/hudi/io/compress/TestHoodieDecompressor.java:
##########
@@ -72,13 +72,11 @@ public void testDefaultDecompressors(CompressionCodec 
codec) throws IOException
   private static InputStream prepareInputStream(CompressionCodec codec) throws 
IOException {
     switch (codec) {
       case NONE:
-        return new ByteArrayInputStream(INPUT_BYTES);
+        return new ByteArrayInputStream(
+            new HoodieNoneDecompressor().compress(INPUT_BYTES));
       case GZIP:
-        ByteArrayOutputStream stream = new ByteArrayOutputStream();
-        try (GZIPOutputStream gzipOutputStream = new GZIPOutputStream(stream)) 
{
-          gzipOutputStream.write(INPUT_BYTES);
-        }
-        return new ByteArrayInputStream(stream.toByteArray());
+        return new ByteArrayInputStream(
+            new HoodieAirliftGzipDecompressor().compress(INPUT_BYTES));

Review Comment:
   We should add separate test `#compress` in `testDefaultDecompressors`, 
instead of coupling this with decompression.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to