public class TestSplitJoinThreeLevels extends AbstractBTreeTestCase
AbstractBTree.insert(Object, Object)
to split a tree to
height two (2) (three levels) and then using AbstractBTree.remove(Object)
to
reduce the tree back to a single, empty root leaf. This test suite is focused
on m := 3 since we are capable of exercising all split() and join() code
paths with that branching factor.
Note: This also tests the AbstractNode.isLeftMostNode()
and
AbstractNode.isRightMostNode()
methods. In order to test those
methods as applied to track the #of head splits and tail splits we need a
btree with at least 2 levels of nodes above a layer of leaves. This is
because the methods are tested on a leaf, which checks its parent, which,
really, needs to test a non-root parent before we can say that this is
working as it should.
for the examples used in this test suite.
TestCase2.MyProperties, TestCase2.RandomType
keyBuilder, log, r
_randomType
Constructor and Description |
---|
TestSplitJoinThreeLevels() |
TestSplitJoinThreeLevels(String name) |
Modifier and Type | Method and Description |
---|---|
void |
test_removeOrder3a()
Test ability to split and join a tree of order m == 3 driven by the
insertion and then the removal of a known sequence of keys.
|
void |
test_removeOrder3b()
Variant of
test_removeOrder3a() that excercises some different
code paths while removing keys by choosing a different order in which to
remove some keys. |
void |
test_removeOrder3c()
Variant of
test_removeOrder3a() that is focused on testing the
redistribution of keys among the left and right siblings of a node when
that node underflows during a deletion operation. |
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
public TestSplitJoinThreeLevels()
public TestSplitJoinThreeLevels(String name)
name
- public void test_removeOrder3a()
Node.merge(AbstractNode, boolean)
and
Node.redistributeKeys(AbstractNode, boolean)
that are not
exercised by this test.test_removeOrder3a()
public void test_removeOrder3b()
test_removeOrder3a()
that excercises some different
code paths while removing keys by choosing a different order in which to
remove some keys. Both tests build the same initial tree. However, this
tests begins by removing a key (7) from the right edge of the tree while
the other test beings by removing a key (1) from the left edge of the
tree.public void test_removeOrder3c()
test_removeOrder3a()
that is focused on testing the
redistribution of keys among the left and right siblings of a node when
that node underflows during a deletion operation.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.