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

Method testCorrupt

java/core/src/test/org/apache/orc/impl/TestZlib.java:51–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 }
50
51 @Test
52 public void testCorrupt() throws Exception {
53 ByteBuffer buf = ByteBuffer.allocate(1000);
54 buf.put(new byte[]{127,-128,0,99,98,-1});
55 buf.flip();
56 CompressionCodec codec = new ZlibCodec();
57 ByteBuffer out = ByteBuffer.allocate(1000);
58 try {
59 codec.decompress(buf, out);
60 fail();
61 } catch (IOException ioe) {
62 // EXPECTED
63 }
64 }
65
66 @Test
67 public void testCorruptZlibFile() {

Callers

nothing calls this directly

Calls 3

decompressMethod · 0.95
putMethod · 0.80
flipMethod · 0.80

Tested by

no test coverage detected