MCPcopy Create free account
hub / github.com/apache/orc / testCorrupt

Method testCorrupt

java/core/src/test/org/apache/orc/impl/TestZstd.java:55–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

53 }
54
55 @Test
56 public void testCorrupt() throws Exception {
57 ByteBuffer buf = ByteBuffer.allocate(1000);
58 buf.put(new byte[] {127, 125, 1, 99, 98, 1});
59 buf.flip();
60 CompressionCodec codec = new ZstdCodec();
61 ByteBuffer out = ByteBuffer.allocate(1000);
62 try {
63 codec.decompress(buf, out);
64 fail();
65 } catch (ZstdException ioe) {
66 // EXPECTED
67 }
68 }
69
70 /**
71 * Test compatibility of zstd-jni and aircompressor Zstd implementations

Callers

nothing calls this directly

Calls 3

decompressMethod · 0.95
putMethod · 0.80
flipMethod · 0.80

Tested by

no test coverage detected