public abstract class AbstractNodeOrLeafDataRecordTestCase extends AbstractBTreeTestCase
TestCase2.MyProperties, TestCase2.RandomType
Modifier and Type | Field and Description |
---|---|
protected IAbstractNodeDataCoder<?> |
coder
Set by concrete test suite classes to the coder under test.
|
keyBuilder, log, r
_randomType
Constructor and Description |
---|
AbstractNodeOrLeafDataRecordTestCase() |
AbstractNodeOrLeafDataRecordTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
doRoundTripTest(IAbstractNodeData expected,
IAbstractNodeDataCoder<?> coder,
DataOutputBuffer buf) |
void |
doStressTest(int ntrials,
int nnodes)
Run a stress test.
|
ILeafData |
getRandomLeaf(int m,
boolean isDeleteMarkers,
boolean isVersionTimestamps,
boolean isRawRecords)
Generates a leaf node with random data.
|
INodeData |
getRandomNode(int m)
Generates a non-leaf node with random data.
|
IAbstractNodeData |
getRandomNodeOrLeaf(int m,
boolean deleteMarkers,
boolean versionTimestamps,
boolean rawRecords)
Generates a node or leaf (randomly) with random data.
|
protected abstract boolean |
mayGenerateLeaves() |
protected abstract boolean |
mayGenerateNodes() |
protected ILeafData |
mockLeafFactory(IRaba keys,
IRaba vals)
Factory for the mock
ILeafData object used to provide ground
truth for the fixture under test. |
protected ILeafData |
mockLeafFactory(IRaba keys,
IRaba vals,
boolean[] deleteMarkers,
long[] versionTimestamps,
boolean[] rawRecords)
Factory for the mock
ILeafData object used to provide ground
truth for the fixture under test. |
protected long |
nextAddr()
A random address that is only syntactically valid (do not dereference).
|
void |
test_nodeOrLeafFlag()
Verify methods that recognize a node vs a leaf based on a byte.
|
void |
testStress()
De-serialization stress test conducted for a variety of and branching
factors.
|
assertChildKeys, assertEntryCounts, assertKeys, assertKeys, assertKeys, assertSameAbstractNodeData, assertSameBTree, assertSameEntryIterator, assertSameEntryIterator, assertSameIterator, assertSameIterator, assertSameLeaf, assertSameLeafData, assertSameNode, assertSameNodeData, assertSameNodeOrLeaf, assertSameRaba, assertValues, assertValues, doEntryIteratorTest, doInsertKeySequenceTest, doInsertLookupRemoveStressTest, doInsertRandomKeySequenceTest, doInsertRandomKeySequenceTest, doInsertRandomSparseKeySequenceTest, doKnownKeySequenceTest, doRandomIndexOfTest, doRandomKeyInsertTest, doRandomLookupTest, doRemoveStructureStressTest, doSplitTest, doSplitWithDecreasingKeySequence, doSplitWithIncreasingKeySequence, doSplitWithRandomDenseKeySequence, getBTree, getBTree, getKeysAndValues, getRandomKeys, getRandomKeyValues, i2k, nextLong, useRawRecords
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
protected IAbstractNodeDataCoder<?> coder
public AbstractNodeOrLeafDataRecordTestCase()
public AbstractNodeOrLeafDataRecordTestCase(String name)
name
- protected final ILeafData mockLeafFactory(IRaba keys, IRaba vals)
ILeafData
object used to provide ground
truth for the fixture under test.keys
- The keys.vals
- The values.ILeafData
object.protected ILeafData mockLeafFactory(IRaba keys, IRaba vals, boolean[] deleteMarkers, long[] versionTimestamps, boolean[] rawRecords)
ILeafData
object used to provide ground
truth for the fixture under test.keys
- The keys.vals
- The values.deleteMarkers
- The delete markers (optional).versionTimestamps
- The version timestamps (optional).rawRecords
- The bit flags indicating which tuples are have their value
stored as a raw record on the backing persistence store
(optional).ILeafData
object.public void testStress()
public void doStressTest(int ntrials, int nnodes)
Note: You may run out of heap space during the test for large branching factors when combined with a large #of nodes.
ntrials
- The #of trials. Each trial has a random slotSize and
branchingFactor. 50% of the trials (on average) will use
record compression.nnodes
- The #of random nodes per trial.protected void doRoundTripTest(IAbstractNodeData expected, IAbstractNodeDataCoder<?> coder, DataOutputBuffer buf)
expected
- coder
- buf
- protected long nextAddr()
public INodeData getRandomNode(int m)
public ILeafData getRandomLeaf(int m, boolean isDeleteMarkers, boolean isVersionTimestamps, boolean isRawRecords)
public IAbstractNodeData getRandomNodeOrLeaf(int m, boolean deleteMarkers, boolean versionTimestamps, boolean rawRecords)
protected abstract boolean mayGenerateNodes()
protected abstract boolean mayGenerateLeaves()
public void test_nodeOrLeafFlag()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.