Revert experimental change
This commit is contained in:
@@ -30,19 +30,19 @@ class VelocityCompressorTest {
|
|||||||
if (compressor instanceof JavaVelocityCompressor) {
|
if (compressor instanceof JavaVelocityCompressor) {
|
||||||
fail("Loaded regular compressor");
|
fail("Loaded regular compressor");
|
||||||
}
|
}
|
||||||
check(compressor, Unpooled::directBuffer);
|
check(compressor);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void javaIntegrityCheck() throws DataFormatException {
|
void javaIntegrityCheck() throws DataFormatException {
|
||||||
JavaVelocityCompressor compressor = new JavaVelocityCompressor();
|
JavaVelocityCompressor compressor = new JavaVelocityCompressor();
|
||||||
check(compressor, Unpooled::buffer);
|
check(compressor);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void check(VelocityCompressor compressor, Supplier<ByteBuf> supplier) throws DataFormatException {
|
private void check(VelocityCompressor compressor) throws DataFormatException {
|
||||||
ByteBuf source = supplier.get();
|
ByteBuf source = Unpooled.directBuffer();
|
||||||
ByteBuf dest = supplier.get();
|
ByteBuf dest = Unpooled.directBuffer();
|
||||||
ByteBuf decompressed = supplier.get();
|
ByteBuf decompressed = Unpooled.directBuffer();
|
||||||
|
|
||||||
Random random = new Random(1);
|
Random random = new Random(1);
|
||||||
byte[] randomBytes = new byte[1 << 16];
|
byte[] randomBytes = new byte[1 << 16];
|
||||||
|
Reference in New Issue
Block a user