public abstract class AbstractRecordCompressorTestCase extends TestCase2 implements IRecordCompressorFactory
IRecordCompressor
test suites.ByteBuffer
s and one
using a DirectBufferPool
to give us a direct buffer for
testing. This will test the logic that handles cases when we can not
access the backing byte[].TestCase2.MyProperties, TestCase2.RandomType
_randomType, log
Constructor and Description |
---|
AbstractRecordCompressorTestCase() |
AbstractRecordCompressorTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
protected int |
doCompressionTest(IRecordCompressor c,
byte[] expected,
int off,
int len)
Test helper applies the compression algorithm to the data and then
verifies that the expected data can be recovered by applying the
decompression algorithm.
|
protected byte[] |
getRandomRecord(int n)
Generate a record comprised of n random terms selected from
words . |
void |
test_recordCompressor_stressTest()
Stress test ability to compress and decompress data.
|
void |
test_recordCompressor01()
Test ability to compress and decompress data.
|
void |
test_recordCompressor02()
Test ability to compress and decompress data using a de-serialized
compression provider.
|
void |
test_recordCompressor03()
Test ability to compress and decompress zero-length data.
|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getProperties, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getInstance
public AbstractRecordCompressorTestCase()
public AbstractRecordCompressorTestCase(String name)
name
- protected byte[] getRandomRecord(int n)
words
. The terms are concatenated with whitespace separators
and then serialized as a byte[] which is returned to the caller.n
- The #of terms to include in the record.protected int doCompressionTest(IRecordCompressor c, byte[] expected, int off, int len)
c
- The (de-)compressor.expected
- The data to be compressed.public void test_recordCompressor01()
public void test_recordCompressor02()
public void test_recordCompressor03()
public void test_recordCompressor_stressTest()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.