public class TestTouch extends AbstractBTreeTestCase
AbstractBTree.touch(AbstractNode)
. None of these tests cause
an evicted node to be made persistent, but they do verify the correct
tracking of the AbstractNode.referenceCount
and the contract for
touching a node.TestCase2.MyProperties, TestCase2.RandomType
keyBuilder, log, r
_randomType
Modifier and Type | Method and Description |
---|---|
void |
test_touch01()
Test verifies that the reference counter is incremented when a node is
appended to the hard reference queue (the scan of the tail of the queue
is disabled for this test).
|
void |
test_touch02()
Test verifies that the reference counter is unchanged across
AbstractBTree.touch(AbstractNode) if a node is already on the hard
reference queue. |
void |
test_touch03()
Test verifies that touching a node when the queue is full and the node is
the next reference to be evicted from the queue does NOT cause the node
to be made persistent.
|
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 TestTouch()
public TestTouch(String name)
name
- public void test_touch01()
public void test_touch02()
AbstractBTree.touch(AbstractNode)
if a node is already on the hard
reference queue.public void test_touch03()
AbstractBTree.touch(AbstractNode)
handles
this condition by incrementing the reference counter before appending the
node to the queue and therefore ensuring that the reference counter for
the node that touched is not zero if the node is also selected for
eviction. The test also verifies that the reference counter is correctly
maintained across the touch. Since the counter was one before the touch
and since the root was itself evicted, the counter after the touch is
1+1-1 = 1
.
FIXME This test needs to use a tree with nodes and leaves or fake another
root leaf since the minimum cache size is (2)Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.