public class TestChunkedIterators extends AbstractBTreeTestCase
AbstractChunkedTupleIterator
and its concrete
ChunkedLocalRangeIterator
implementation which depends on the
ResultSet
.
Note: There are other implementations derived from the same abstract base class so they have a dependency on this test suite to get it right for the base class.
TestCase2.MyProperties, TestCase2.RandomType
keyBuilder, log, r
_randomType
Constructor and Description |
---|
TestChunkedIterators() |
TestChunkedIterators(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
doChunkedIteratorResultSetTest(int N,
boolean deleteMarkers,
boolean versionTimestamps) |
protected int |
doDeserializationTest(BTree ndx,
byte[] fromKey,
byte[] toKey,
int capacity,
int flags,
IFilter filterCtor)
Test helper requests an
ITupleIterator using the specified
parameters directly on the BTree (ground truth for the purposes
of this test) and indirectly via an AbstractChunkedTupleIterator . |
void |
test_chunkedIteratorResultSets()
Unit test for (de-)serialization of
ResultSet s used by the
chunked iterators. |
void |
test_oneChunk()
Test correct traversal when all the data fits into a single chunk.
|
void |
test_removeAll_limit1()
Test of
IRangeQuery.REMOVEALL using a limit (capacity := 1). |
void |
test_removeAll()
Test of
IRangeQuery.REMOVEALL using a filter. |
void |
test_reverseScan()
Test progression of a chunked iterator scan in reverse order.
|
void |
test_twoChunks()
Test where the iterator has to fetch a second
ResultSet . |
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 TestChunkedIterators()
public TestChunkedIterators(String name)
name
- public void test_oneChunk()
public void test_twoChunks()
ResultSet
.public void test_removeAll_limit1()
IRangeQuery.REMOVEALL
using a limit (capacity := 1). This
form of the iterator is used to support queue constructs since the delete
is performed on the unisolated index. The state of the index is verified
afterwards.public void test_removeAll()
IRangeQuery.REMOVEALL
using a filter. Only the even keys
are deleted. The state of the index is verified afterwards.public void test_reverseScan()
public void test_chunkedIteratorResultSets()
ResultSet
s used by the
chunked iterators.protected void doChunkedIteratorResultSetTest(int N, boolean deleteMarkers, boolean versionTimestamps)
N
- The #of tuples for the test.deleteMarkers
- if delete markers should be tested.versionTimestamps
- if version timestamps should be tested.protected int doDeserializationTest(BTree ndx, byte[] fromKey, byte[] toKey, int capacity, int flags, IFilter filterCtor)
ITupleIterator
using the specified
parameters directly on the BTree
(ground truth for the purposes
of this test) and indirectly via an AbstractChunkedTupleIterator
.
The AbstractChunkedTupleIterator
is layered in order to force
(de-)serialization of each ResultSet
. The iterators are then
compared and should visit the same ITuple
s in the same order.ndx
- fromKey
- toKey
- capacity
- flags
- filterCtor
- AssertionError
- if the tuples visited differ in any manner.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.