public class TestMutableBTreeCursors extends AbstractBTreeCursorTestCase
ITupleCursor while the SAME
THREAD is used to insert, update, or remove tuples from a mutable
BTree.TestCase2.MyProperties, TestCase2.RandomType_randomType, log| Constructor and Description |
|---|
TestMutableBTreeCursors() |
TestMutableBTreeCursors(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isReadOnly()
Return
true if the B+Tree under test is read-only. |
protected ITupleCursor2<String> |
newCursor(AbstractBTree btree,
int flags,
byte[] fromKey,
byte[] toKey)
Create an appropriate cursor instance for the given B+Tree.
|
void |
test_concurrent_modification_copy_on_write()
Unit test for copy-on-write (the leaf is clean and then an update,
insert, or remove is requested which forces copy-on-write to clone the
leaf).
|
void |
test_concurrent_modification_insert_split_root_leaf()
Unit test for concurrent modification resulting from insert() and
remove() including (a) where the root leaf is split by the insert() and
(b) where remove() causes an underflow that triggers a join of the leaf
with its sibling forcing the underflow of the parent such that the leaf
then becomes the new root leaf.
|
void |
test_concurrent_modification_insert()
Unit test for concurrent modification resulting from insert() and remove().
|
void |
test_concurrent_modification_update()
Test for update (the tuple state must be re-copied from the index).
|
void |
test_cursor_remove_during_forward_traversal()
Test ability to remove tuples using
ITupleCursor.remove() during
forward traversal. |
void |
test_cursor_remove_during_reverse_traversal()
Test ability to remove tuples using
ITupleCursor.remove() during
reverse traversal. |
void |
test_delete_markers_doNotVisitDeleted()
Test examines the behavior of the cursor when delete markers are enabled
and the cursor is NOT willing to visited deleted tuples.
|
void |
test_delete_markers_visitDeleted()
Test examines the behavior of the cursor when delete markers are enabled
and the cursor is willing to visited deleted tuples.
|
void |
test_hasNext_continues_after_insert()
Test verifies that an iterator which is scanning in forward order can be
exhausted when it reaches the end of the visitable tuples but that a
visitable tuple inserted after the current cursor position will be
noticed by
ITupleCursor.hasNext() and visited. |
void |
test_hasPrior_continues_after_insert()
Test verifies that an iterator which is scanning in reverse order can be
exhausted when it reaches the end of the visitable tuples but that a
visitable tuple inserted after the current cursor position will be
noticed by
ITupleCursor.hasPrior() and visited. |
test_baseCase, test_emptyIndex, test_keyRange_correctRejection, test_oneTuple, test_reverseTraversalassertEquals, doBaseCaseTest, doEmptyIndexTest, doOneTupleTest, doReverseTraversalTest, getBaseCaseBTree, getOneTupleBTree, getReverseTraversalBTree, newCursorassertEquals, 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, logPropertiesassertEquals, 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, toStringpublic TestMutableBTreeCursors()
public TestMutableBTreeCursors(String name)
name - protected boolean isReadOnly()
AbstractBTreeCursorTestCasetrue if the B+Tree under test is read-only.isReadOnly in class AbstractBTreeCursorTestCaseprotected ITupleCursor2<String> newCursor(AbstractBTree btree, int flags, byte[] fromKey, byte[] toKey)
AbstractTupleCursorTestCasenewCursor in class AbstractTupleCursorTestCaseITupleCursor for that B+Tree.public void test_cursor_remove_during_forward_traversal()
ITupleCursor.remove() during
forward traversal.public void test_cursor_remove_during_reverse_traversal()
ITupleCursor.remove() during
reverse traversal.public void test_concurrent_modification_update()
Note that copy-on-write is handled differently even when the trigger is an update (vs an insert or a remove).
public void test_concurrent_modification_insert()
public void test_concurrent_modification_insert_split_root_leaf()
Note: This test does not covert overflow where a tuple is rotated to the sibling or underflow where a tuple is rotated from the sibling. Those cases (and all cases involving deeper trees) are covered by the various stress tests where a BTree is perturbed randomly and checked against ground truth.
public void test_concurrent_modification_copy_on_write()
public void test_delete_markers_visitDeleted()
public void test_delete_markers_doNotVisitDeleted()
public void test_hasNext_continues_after_insert()
ITupleCursor.hasNext() and visited.public void test_hasPrior_continues_after_insert()
ITupleCursor.hasPrior() and visited.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.