public class TestWriteCache extends TestCase3
WriteCache
.
Note: This test suite uses the DirectBufferPool
to allocate its
buffers. This reduces the likelihood that direct buffers will be leaked
across the unit tests. The tests are written defensively to release the
ByteBuffer
s back to the DirectBufferPool
.
TestCase2.MyProperties, TestCase2.RandomType
Modifier and Type | Field and Description |
---|---|
protected Random |
r
A random number generated - the seed is NOT fixed.
|
_randomType, log
Constructor and Description |
---|
TestWriteCache() |
TestWriteCache(String name) |
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
getRandomData()
Returns random data that will fit in N bytes.
|
ByteBuffer |
getRandomData(int nbytes)
Returns random data that will fit in nbytes.
|
void |
test_writeCache01()
Exercises most of the API.
|
void |
test_writeCacheChecksums()
Confirm checksum errors
|
void |
test_writeCacheScatteredWrites()
Similar to writeCache01 but uses the ScatteredWrite.
|
void |
test_writeCacheStressScatteredWrites()
Generate large number of scattered writes to force flushing
|
assertCondition, assertCondition, assertEquals, assertEquals, getBytes, getPort, getRandomData, setUp, tearDown
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, toString
protected final Random r
public TestWriteCache()
public TestWriteCache(String name)
name
- public void test_writeCacheChecksums()
public void test_writeCache01() throws IOException, InterruptedException
IOException
InterruptedException
public void test_writeCacheScatteredWrites() throws IOException, InterruptedException
IOException
InterruptedException
public void test_writeCacheStressScatteredWrites() throws IOException, InterruptedException
IOException
InterruptedException
public ByteBuffer getRandomData()
ByteBuffer
wrapping a new byte[]
of
random length and having random contents.public ByteBuffer getRandomData(int nbytes)
getRandomData
in class TestCase3
ByteBuffer
wrapping a new byte[]
having random contents.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.