BTreeTest Class Reference

Inheritance diagram for BTreeTest:

SegStorageTestBase CacheTestBase TestBase TraceTarget List of all members.

Public Member Functions

 BTreeTest ()
virtual void testCaseSetUp ()
 Equivalent to JUnit TestCase.setUp; this is called before each test case method is invoked.
virtual void testCaseTearDown ()
 Equivalent to JUnit TestCase.tearDown; this is called after each test case method is invoked.
virtual void openStorage (DeviceMode openMode)
virtual void openSegmentStorage (DeviceMode openMode)
virtual void openRandomSegment ()
SharedSegment createLinearDeviceSegment (DeviceId deviceId, uint nPages)
void closeLinearSegment ()
void closeRandomSegment ()
void closeVersionedRandomSegment ()
void closeSnapshotRandomSegment ()
virtual void closeStorage ()
CachegetCache ()
virtual SharedCache newCache ()
SharedRandomAccessDevice openDevice (std::string devName, DeviceMode openMode, uint nDevicePages, DeviceId deviceId)
void closeDevice (DeviceId deviceId, SharedRandomAccessDevice &pDevice)
TestSuitereleaseTestSuite ()
void beforeTestCase (std::string testCaseName)
void afterTestCase (std::string testCaseName)
virtual void notifyTrace (std::string source, TraceLevel level, std::string message)
 Receives notification when a trace event occurs.
virtual TraceLevel getSourceTraceLevel (std::string source)
 Gets the level at which a particular source should be traced.

Static Public Member Functions

static void readParams (int argc, char **argv)
 Parses the command line.

Static Public Attributes

static ParamName paramTestSuiteName
static ParamName paramTraceFileName
static ParamName paramDictionaryFileName
static ParamName paramTraceLevel
static ParamName paramStatsFileName
static ParamName paramTraceStdout
static ParamName paramDegreeOfParallelism
static ConfigMap configMap
 Configuration parameters.

Protected Types

enum  VictimPolicy { victimTwoQ, victimLRU, victimRandom }
 The available victim policy implementations. More...

Protected Member Functions

void snooze (uint nSeconds)

Protected Attributes

SharedSegmentFactory pSegmentFactory
SharedSegment pLinearSegment
 Segment supporting linear page allocation.
SharedSegment pRandomSegment
 (Optional) segment supporting random page allocation.
SharedSegment pVersionedRandomSegment
 (Optional) segment supporting versioned random page allocation.
SharedSegment pSnapshotRandomSegment
 (Optional) segment supporting snapshot random page allocation.
VictimPolicy victimPolicy
 VictimPolicy to instantiate.
CacheParams cacheParams
 Parameters for cache initialization.
SharedCache pCache
 Cache instance being tested.
SharedRandomAccessDevice pRandomAccessDevice
 The default cached device.
uint nMemPages
 Size of cache in memory pages.
uint nDiskPages
 Size of device in disk pages.
uint cbPageFull
 Disk page size.
DeviceId dataDeviceId
 Fixed ID to assign to data device.
TestSuitepTestSuite
 Boost test suite.
boost::shared_ptr< TestBasepTestObj
std::ofstream traceStream
 Output file stream for tracing.
StrictMutex traceMutex
 Protects traceStream.
std::string testName
 Name of test.
TraceLevel traceLevel
 Level at which to trace test execution.
FileStatsTarget statsTarget
 Output for stats.
StatsTimer statsTimer
 Timer for stats collection.
bool traceStdout
 Copy trace output to stdout.
bool traceFile
 Copy trace output to file.
TestCaseGroup defaultTests
TestCaseGroup extraTests

Static Protected Attributes

static bool runAll
 Run all test cases, including the extra tests.
static std::string runSingle
 Run only the test case of this name.

Private Types

enum  { nRandomSeed = 1000000, iValueMax = 1000000000 }
enum  InsertType { MONOTONIC, SEQUENTIAL, RANDOM }

Private Member Functions

int32_t readKey ()
int32_t readSecondKey ()
int32_t readValue ()
int32_t readMultiKeyValue ()
void verifyTree (uint nRecordsExpected, uint nLevelsExpected)
void testBulkLoadOneLevelNewRoot ()
void testBulkLoadOneLevelReuseRoot ()
void testBulkLoadTwoLevelsNewRoot ()
void testBulkLoadTwoLevelsReuseRoot ()
void testBulkLoadThreeLevels ()
void testBulkLoad (uint nRecords, uint nLevelsExpected, bool newRoot)
void testScan (SharedByteInputStream, uint nRecords, bool alternating, bool deletion)
void testSearch (SharedByteInputStream, uint nRecords, bool leastUpper)
void testSearchLast ()
void testSequentialInserts ()
void testRandomInserts ()
void testMonotonicInserts ()
void testInserts (InsertType insertType)
void marshalRecord ()
void marshalMultiKeyRecord ()
void unmarshalRecord (SharedByteInputStream pInputStream)
void testMultiKeySearches (uint nKey1, uint nKey2)
void testSmallMultiKeySearches ()
void testBigMultiKeySearches ()

Private Attributes

BTreeDescriptor descriptor
TupleAccessor tupleAccessor
TupleData keyData
TupleData tupleData
Record record
boost::scoped_array< FixedBufferrecordBuf

Classes

struct  Record

Detailed Description

Definition at line 41 of file BTreeTest.cpp.


Member Enumeration Documentation

anonymous enum [private]

Enumerator:
nRandomSeed 
iValueMax 

Definition at line 43 of file BTreeTest.cpp.

00043          {
00044         nRandomSeed = 1000000,
00045         iValueMax = 1000000000
00046     };

enum BTreeTest::InsertType [private]

Enumerator:
MONOTONIC 
SEQUENTIAL 
RANDOM 

Definition at line 48 of file BTreeTest.cpp.

00048                     {
00049         MONOTONIC,
00050         SEQUENTIAL,
00051         RANDOM
00052     };

enum CacheTestBase::VictimPolicy [protected, inherited]

The available victim policy implementations.

Enumerator:
victimTwoQ 
victimLRU 
victimRandom 

Definition at line 44 of file CacheTestBase.h.

00044                       {
00045         victimTwoQ,
00046         victimLRU,
00047         victimRandom
00048     };


Constructor & Destructor Documentation

BTreeTest::BTreeTest (  )  [inline, explicit]

Definition at line 146 of file BTreeTest.cpp.

References TupleData::compute(), TupleAccessor::compute(), descriptor, FixedBuffer, TupleAccessor::getMaxByteCount(), BTreeDescriptor::keyProjection, StandardTypeDescriptorFactory::newDataType(), recordBuf, STANDARD_TYPE_INT_32, testBigMultiKeySearches(), testBulkLoadOneLevelNewRoot(), testBulkLoadOneLevelReuseRoot(), testBulkLoadThreeLevels(), testBulkLoadTwoLevelsNewRoot(), testBulkLoadTwoLevelsReuseRoot(), testMonotonicInserts(), testRandomInserts(), testSequentialInserts(), testSmallMultiKeySearches(), tupleAccessor, tupleData, and BTreeDescriptor::tupleDescriptor.

00147     {
00148         FENNEL_UNIT_TEST_CASE(BTreeTest,testBulkLoadOneLevelNewRoot);
00149         FENNEL_UNIT_TEST_CASE(BTreeTest,testBulkLoadOneLevelReuseRoot);
00150         FENNEL_UNIT_TEST_CASE(BTreeTest,testBulkLoadTwoLevelsNewRoot);
00151         FENNEL_UNIT_TEST_CASE(BTreeTest,testBulkLoadTwoLevelsReuseRoot);
00152         FENNEL_UNIT_TEST_CASE(BTreeTest,testBulkLoadThreeLevels);
00153         FENNEL_UNIT_TEST_CASE(BTreeTest,testSequentialInserts);
00154         FENNEL_UNIT_TEST_CASE(BTreeTest,testRandomInserts);
00155         FENNEL_UNIT_TEST_CASE(BTreeTest,testMonotonicInserts);
00156 
00157         // Since these two testcases convert the single key descriptor into a
00158         // multi-key descriptor, any tests that require the single key
00159         // descriptor should run before these.
00160         FENNEL_UNIT_TEST_CASE(BTreeTest,testSmallMultiKeySearches);
00161         FENNEL_UNIT_TEST_CASE(BTreeTest,testBigMultiKeySearches);
00162 
00163         StandardTypeDescriptorFactory stdTypeFactory;
00164         TupleAttributeDescriptor attrDesc(
00165             stdTypeFactory.newDataType(STANDARD_TYPE_INT_32));
00166         descriptor.tupleDescriptor.push_back(attrDesc);
00167         descriptor.tupleDescriptor.push_back(attrDesc);
00168         descriptor.keyProjection.push_back(0);
00169         tupleAccessor.compute(descriptor.tupleDescriptor);
00170         recordBuf.reset(new FixedBuffer[tupleAccessor.getMaxByteCount()]);
00171         tupleData.compute(descriptor.tupleDescriptor);
00172     }


Member Function Documentation

int32_t BTreeTest::readKey (  )  [private]

Definition at line 418 of file BTreeTest.cpp.

References tupleData.

Referenced by testInserts(), testMultiKeySearches(), testScan(), testSearch(), and unmarshalRecord().

00419 {
00420     return *reinterpret_cast<int32_t const *>(
00421         tupleData[0].pData);
00422 }

int32_t BTreeTest::readSecondKey (  )  [private]

Definition at line 424 of file BTreeTest.cpp.

References tupleData.

Referenced by testMultiKeySearches().

00425 {
00426     return *reinterpret_cast<int32_t const *>(
00427         tupleData[1].pData);
00428 }

int32_t BTreeTest::readValue (  )  [private]

Definition at line 430 of file BTreeTest.cpp.

References tupleData.

Referenced by testInserts(), testScan(), testSearch(), and unmarshalRecord().

00431 {
00432     return *reinterpret_cast<int32_t const *>(
00433         tupleData[1].pData);
00434 }

int32_t BTreeTest::readMultiKeyValue (  )  [private]

Definition at line 436 of file BTreeTest.cpp.

References tupleData.

Referenced by testMultiKeySearches().

00437 {
00438     return *reinterpret_cast<int32_t const *>(
00439         tupleData[2].pData);
00440 }

void BTreeTest::verifyTree ( uint  nRecordsExpected,
uint  nLevelsExpected 
) [private]

Definition at line 313 of file BTreeTest.cpp.

References descriptor, BTreeVerifier::getStatistics(), BTreeStatistics::nLevels, BTreeStatistics::nTuples, and BTreeVerifier::verify().

Referenced by testBulkLoad().

00314 {
00315     BTreeVerifier verifier(descriptor);
00316     verifier.verify();
00317 
00318     BTreeStatistics const &stats = verifier.getStatistics();
00319     BOOST_CHECK_EQUAL(stats.nLevels,nLevelsExpected);
00320     BOOST_CHECK_EQUAL(stats.nTuples,nRecordsExpected);
00321 }

void BTreeTest::testBulkLoadOneLevelNewRoot (  )  [inline, private]

Definition at line 75 of file BTreeTest.cpp.

References testBulkLoad().

Referenced by BTreeTest().

00076     {
00077         testBulkLoad(200,1,true);
00078     }

void BTreeTest::testBulkLoadOneLevelReuseRoot (  )  [inline, private]

Definition at line 80 of file BTreeTest.cpp.

References testBulkLoad().

Referenced by BTreeTest().

00081     {
00082         testBulkLoad(200,1,false);
00083     }

void BTreeTest::testBulkLoadTwoLevelsNewRoot (  )  [inline, private]

Definition at line 85 of file BTreeTest.cpp.

References testBulkLoad().

Referenced by BTreeTest().

00086     {
00087         testBulkLoad(20000,2,true);
00088     }

void BTreeTest::testBulkLoadTwoLevelsReuseRoot (  )  [inline, private]

Definition at line 90 of file BTreeTest.cpp.

References testBulkLoad().

Referenced by BTreeTest().

00091     {
00092         testBulkLoad(20000,2,false);
00093     }

void BTreeTest::testBulkLoadThreeLevels (  )  [inline, private]

Definition at line 95 of file BTreeTest.cpp.

References testBulkLoad().

Referenced by BTreeTest().

00096     {
00097         testBulkLoad(200000,3,true);
00098     }

void BTreeTest::testBulkLoad ( uint  nRecords,
uint  nLevelsExpected,
bool  newRoot 
) [private]

Definition at line 219 of file BTreeTest.cpp.

References BTreeBuilder::build(), TupleData::compute(), BTreeBuilder::createEmptyRoot(), descriptor, TupleAccessor::getCurrentByteCount(), BTreeAccessBase::getKeyDescriptor(), BTreeAccessBase::getRootPageId(), iValueMax, BTreeTest::Record::key, keyData, marshalRecord(), SegInputStream::newSegInputStream(), SegOutputStream::newSegOutputStream(), nRandomSeed, NULL_PAGE_ID, CacheTestBase::pCache, SegStorageTestBase::pRandomSegment, record, recordBuf, BTreeDescriptor::rootPageId, testScan(), testSearch(), BTreeBuilder::truncate(), tupleAccessor, BTreeTest::Record::value, and verifyTree().

Referenced by testBulkLoadOneLevelNewRoot(), testBulkLoadOneLevelReuseRoot(), testBulkLoadThreeLevels(), testBulkLoadTwoLevelsNewRoot(), and testBulkLoadTwoLevelsReuseRoot().

00220 {
00221     BlockNum nPagesAllocatedInitially =
00222         pRandomSegment->getAllocatedSizeInPages();
00223 
00224     descriptor.rootPageId = NULL_PAGE_ID;
00225     BTreeBuilder builder(descriptor,pRandomSegment);
00226 
00227     keyData.compute(builder.getKeyDescriptor());
00228     keyData[0].pData = reinterpret_cast<PConstBuffer>(&record.key);
00229 
00230     // NOTE jvs 15-Nov-2005:  This looks like it's doing the opposite of
00231     // what it's supposed to, but it's actually correct.  What we're doing
00232     // here is testing for preservation of the root PageId of an existing
00233     // truncated index.  This is important for catalogs which store
00234     // the root PageId as an attribute of an index.  So, newRoot=true
00235     // means let the builder allocate a new root; newRoot=false means
00236     // verify that the build preserves the location of the existing root.
00237     // To verify that, we create an empty root here (simulating the
00238     // truncation of an existing index before reload).
00239     if (!newRoot) {
00240         builder.createEmptyRoot();
00241         descriptor.rootPageId = builder.getRootPageId();
00242     }
00243 
00244     // Generate random key/value data
00245     SegmentAccessor segmentAccessor(pRandomSegment,pCache);
00246     SharedSegOutputStream pOutputStream =
00247         SegOutputStream::newSegOutputStream(segmentAccessor);
00248     std::subtractive_rng randomNumberGenerator(nRandomSeed);
00249     record.key = 0;
00250     for (uint i = 0; i < nRecords; i++) {
00251         // +2 to guarantee holes
00252         record.key += (randomNumberGenerator(10)) + 2;
00253         record.value = randomNumberGenerator(iValueMax);
00254 
00255         marshalRecord();
00256         uint cbTuple = tupleAccessor.getCurrentByteCount();
00257         PBuffer pBuffer = pOutputStream->getWritePointer(cbTuple);
00258         memcpy(pBuffer,recordBuf.get(),cbTuple);
00259         pOutputStream->consumeWritePointer(cbTuple);
00260     }
00261     PageId pageId = pOutputStream->getFirstPageId();
00262     pOutputStream.reset();
00263     SharedSegInputStream pInputStream =
00264         SegInputStream::newSegInputStream(segmentAccessor,pageId);
00265     SegStreamPosition startPos;
00266     pInputStream->getSegPos(startPos);
00267 
00268     // Load the data into the tree
00269     builder.build(*pInputStream,nRecords,1.0);
00270     descriptor.rootPageId = builder.getRootPageId();
00271 
00272     // Check tree integrity
00273     verifyTree(nRecords,nLevelsExpected);
00274 
00275     // Make sure we can search for each key individually
00276     pInputStream->seekSegPos(startPos);
00277     testSearch(pInputStream,nRecords,true);
00278 
00279     // Do same search, but searching for greatest lower bound during
00280     // intermediate searches
00281     pInputStream->seekSegPos(startPos);
00282     testSearch(pInputStream,nRecords,false);
00283 
00284     // Make sure we can scan all tuples
00285     pInputStream->seekSegPos(startPos);
00286     testScan(pInputStream,nRecords,false,false);
00287 
00288     // Now delete every other tuple
00289     pInputStream->seekSegPos(startPos);
00290     testScan(pInputStream,nRecords,true,true);
00291 
00292     // Recheck tree integriy
00293     verifyTree(nRecords / 2,nLevelsExpected);
00294 
00295     // Rescan to make sure deletions were performed correctly
00296     pInputStream->seekSegPos(startPos);
00297     testScan(pInputStream,nRecords,true,false);
00298 
00299     // Deallocate the test data storage
00300     pInputStream->seekSegPos(startPos);
00301     pInputStream->setDeallocate(true);
00302     pInputStream.reset();
00303 
00304     // And deallocate the tree's storage
00305     builder.truncate(true);
00306 
00307     // Make sure there are no leaks
00308     BOOST_CHECK_EQUAL(
00309         pRandomSegment->getAllocatedSizeInPages(),
00310         nPagesAllocatedInitially);
00311 }

void BTreeTest::testScan ( SharedByteInputStream  ,
uint  nRecords,
bool  alternating,
bool  deletion 
) [private]

Definition at line 348 of file BTreeTest.cpp.

References BTreeWriter::deleteCurrent(), descriptor, BTreeReader::endSearch(), BTreeReader::getTupleAccessorForRead(), BTreeTest::Record::key, CacheTestBase::pCache, SegStorageTestBase::pSegmentFactory, readKey(), readValue(), record, BTreeReader::searchFirst(), BTreeReader::searchLast(), BTreeReader::searchNext(), tupleData, TupleAccessor::unmarshal(), unmarshalRecord(), and BTreeTest::Record::value.

Referenced by testBulkLoad().

00351 {
00352     BTreeReader realReader(descriptor);
00353 
00354     SegmentAccessor scratchAccessor = pSegmentFactory->newScratchSegment(
00355         pCache,
00356         1);
00357 
00358     BTreeWriter writer(descriptor,scratchAccessor);
00359 
00360     bool found;
00361     int32_t lastKey = -1;
00362     BTreeReader &reader = deletion ? writer : realReader;
00363     found = reader.searchFirst();
00364     if (!found) {
00365         BOOST_FAIL("searchFirst found nothing");
00366     }
00367     if (alternating && !deletion) {
00368         nRecords /= 2;
00369     }
00370     for (uint i = 0; i < nRecords; ++i) {
00371         unmarshalRecord(pInputStream);
00372         if (alternating && !deletion) {
00373             unmarshalRecord(pInputStream);
00374         }
00375         if (!found) {
00376             BOOST_FAIL("Could not searchNext for key #"
00377                        << i << ":  " << record.key);
00378         }
00379         reader.getTupleAccessorForRead().unmarshal(tupleData);
00380         lastKey = readKey();
00381         BOOST_CHECK_EQUAL(record.key,lastKey);
00382         BOOST_CHECK_EQUAL(record.value,readValue());
00383         if (!(i % 10000)) {
00384             BOOST_MESSAGE(
00385                 "scanned value = " << readValue()
00386                 << " key = " << lastKey);
00387         }
00388         if (deletion) {
00389             if (!alternating || !(i & 1)) {
00390                 writer.deleteCurrent();
00391             }
00392         }
00393         found = reader.searchNext();
00394     }
00395 
00396     reader.endSearch();
00397 
00398     if (!deletion) {
00399         found = reader.searchLast();
00400         if (!found) {
00401             BOOST_FAIL("searchLast found nothing");
00402         }
00403         reader.getTupleAccessorForRead().unmarshal(tupleData);
00404         BOOST_CHECK_EQUAL(lastKey,readKey());
00405         reader.endSearch();
00406     }
00407 }

void BTreeTest::testSearch ( SharedByteInputStream  ,
uint  nRecords,
bool  leastUpper 
) [private]

Definition at line 323 of file BTreeTest.cpp.

References descriptor, DUP_SEEK_ANY, BTreeReader::getTupleAccessorForRead(), BTreeTest::Record::key, keyData, readKey(), readValue(), record, BTreeReader::searchForKey(), tupleData, TupleAccessor::unmarshal(), unmarshalRecord(), and BTreeTest::Record::value.

Referenced by testBulkLoad().

00325 {
00326     BTreeReader reader(descriptor);
00327     for (uint i = 0; i < nRecords; ++i) {
00328         unmarshalRecord(pInputStream);
00329         if (!reader.searchForKey(keyData,DUP_SEEK_ANY,leastUpper)) {
00330             BOOST_FAIL("LeastUpper:" << leastUpper <<
00331                        ". Could not find key #" << i << ":  " << record.key);
00332         }
00333         reader.getTupleAccessorForRead().unmarshal(tupleData);
00334         BOOST_CHECK_EQUAL(record.key,readKey());
00335         BOOST_CHECK_EQUAL(record.value,readValue());
00336         if (!(i % 10000)) {
00337             BOOST_MESSAGE(
00338                 "found value = " << readValue()
00339                 << " key = " << readKey());
00340         }
00341         record.key++;
00342         if (reader.searchForKey(keyData,DUP_SEEK_ANY)) {
00343             BOOST_FAIL("Found key " << record.key << " (shouldn't exist!)");
00344         }
00345     }
00346 }

void BTreeTest::testSearchLast (  )  [private]

Definition at line 409 of file BTreeTest.cpp.

References descriptor, and BTreeReader::searchLast().

00410 {
00411     BTreeReader reader(descriptor);
00412     bool found = reader.searchLast();
00413     if (!found) {
00414         BOOST_FAIL("searchLast found nothing");
00415     }
00416 }

void BTreeTest::testSequentialInserts (  )  [inline, private]

Definition at line 109 of file BTreeTest.cpp.

References SEQUENTIAL, and testInserts().

Referenced by BTreeTest().

00110     {
00111         testInserts(SEQUENTIAL);
00112     }

void BTreeTest::testRandomInserts (  )  [inline, private]

Definition at line 114 of file BTreeTest.cpp.

References RANDOM, and testInserts().

Referenced by BTreeTest().

00115     {
00116         testInserts(RANDOM);
00117     }

void BTreeTest::testMonotonicInserts (  )  [inline, private]

Definition at line 119 of file BTreeTest.cpp.

References MONOTONIC, and testInserts().

Referenced by BTreeTest().

00120     {
00121         testInserts(MONOTONIC);
00122     }

void BTreeTest::testInserts ( InsertType  insertType  )  [private]

Definition at line 442 of file BTreeTest.cpp.

References TupleData::compute(), BTreeBuilder::createEmptyRoot(), descriptor, DUP_FAIL, DUP_SEEK_ANY, BTreeAccessBase::getKeyDescriptor(), BTreeAccessBase::getRootPageId(), BTreeReader::getTupleAccessorForRead(), BTreeWriter::insertTupleFromBuffer(), BTreeTest::Record::key, keyData, marshalRecord(), MONOTONIC, NULL_PAGE_ID, CacheTestBase::pCache, SegStorageTestBase::pRandomSegment, SegStorageTestBase::pSegmentFactory, RANDOM, readKey(), readValue(), record, recordBuf, BTreeDescriptor::rootPageId, BTreeReader::searchForKey(), tupleData, BTreeDescriptor::tupleDescriptor, TupleAccessor::unmarshal(), and BTreeTest::Record::value.

Referenced by testMonotonicInserts(), testRandomInserts(), and testSequentialInserts().

00443 {
00444     uint nRecords = 200000;
00445     descriptor.rootPageId = NULL_PAGE_ID;
00446     BTreeBuilder builder(descriptor,pRandomSegment);
00447 
00448     keyData.compute(builder.getKeyDescriptor());
00449     keyData[0].pData = reinterpret_cast<PConstBuffer>(&record.key);
00450 
00451     tupleData.compute(descriptor.tupleDescriptor);
00452 
00453     builder.createEmptyRoot();
00454     descriptor.rootPageId = builder.getRootPageId();
00455 
00456     SegmentAccessor scratchAccessor = pSegmentFactory->newScratchSegment(
00457         pCache,
00458         1);
00459 
00460     bool monotonic = (insertType == MONOTONIC);
00461     BTreeWriter writer(descriptor,scratchAccessor,monotonic);
00462 
00463     std::vector<int32_t> keys;
00464     for (uint i = 0; i < nRecords; i++) {
00465         keys.push_back(i);
00466     }
00467     if (insertType == RANDOM) {
00468         std::random_shuffle(keys.begin(), keys.end());
00469     }
00470 
00471     // insert the records and then read them back to make sure
00472     // they got inserted
00473     for (uint i = 0; i < nRecords; i++) {
00474         record.key = keys[i];
00475         record.value = -keys[i];
00476         marshalRecord();
00477         writer.insertTupleFromBuffer(
00478             recordBuf.get(), DUP_FAIL);
00479     }
00480 
00481     BTreeReader reader(descriptor);
00482     for (uint i = 0; i < nRecords; ++i) {
00483         record.key = i;
00484         record.value = -i;
00485         if (!reader.searchForKey(keyData,DUP_SEEK_ANY)) {
00486             BOOST_FAIL("Could not find key #" << i << ":  " << record.key);
00487         }
00488         reader.getTupleAccessorForRead().unmarshal(tupleData);
00489         BOOST_CHECK_EQUAL(record.key,readKey());
00490         BOOST_CHECK_EQUAL(record.value,readValue());
00491     }
00492 }

void BTreeTest::marshalRecord (  )  [private]

Definition at line 193 of file BTreeTest.cpp.

References BTreeTest::Record::key, TupleAccessor::marshal(), record, recordBuf, tupleAccessor, tupleData, and BTreeTest::Record::value.

Referenced by testBulkLoad(), and testInserts().

00194 {
00195     tupleData[0].pData = reinterpret_cast<PBuffer>(&record.key);
00196     tupleData[1].pData = reinterpret_cast<PBuffer>(&record.value);
00197     tupleAccessor.marshal(tupleData, recordBuf.get());
00198 }

void BTreeTest::marshalMultiKeyRecord (  )  [private]

Definition at line 200 of file BTreeTest.cpp.

References BTreeTest::Record::key, TupleAccessor::marshal(), record, recordBuf, BTreeTest::Record::secondKey, tupleAccessor, tupleData, and BTreeTest::Record::value.

Referenced by testMultiKeySearches().

00201 {
00202     tupleData[0].pData = reinterpret_cast<PBuffer>(&record.key);
00203     tupleData[1].pData = reinterpret_cast<PBuffer>(&record.secondKey);
00204     tupleData[2].pData = reinterpret_cast<PBuffer>(&record.value);
00205     tupleAccessor.marshal(tupleData, recordBuf.get());
00206 }

void BTreeTest::unmarshalRecord ( SharedByteInputStream  pInputStream  )  [private]

Definition at line 208 of file BTreeTest.cpp.

References TupleAccessor::getCurrentByteCount(), BTreeTest::Record::key, readKey(), readValue(), record, TupleAccessor::setCurrentTupleBuf(), tupleAccessor, tupleData, TupleAccessor::unmarshal(), and BTreeTest::Record::value.

Referenced by testScan(), and testSearch().

00209 {
00210     PConstBuffer pBuf = pInputStream->getReadPointer(1);
00211     tupleAccessor.setCurrentTupleBuf(pBuf);
00212     uint cbTuple = tupleAccessor.getCurrentByteCount();
00213     tupleAccessor.unmarshal(tupleData);
00214     record.key = readKey();
00215     record.value = readValue();
00216     pInputStream->consumeReadPointer(cbTuple);
00217 }

void BTreeTest::testMultiKeySearches ( uint  nKey1,
uint  nKey2 
) [private]

Definition at line 494 of file BTreeTest.cpp.

References TupleData::compute(), TupleAccessor::compute(), BTreeBuilder::createEmptyRoot(), BTreeWriter::deleteCurrent(), descriptor, DUP_FAIL, DUP_SEEK_ANY, DUP_SEEK_BEGIN, DUP_SEEK_END, BTreeReader::endSearch(), FixedBuffer, BTreeAccessBase::getKeyDescriptor(), TupleAccessor::getMaxByteCount(), BTreeAccessBase::getRootPageId(), BTreeWriter::insertTupleFromBuffer(), BTreeTest::Record::key, keyData, BTreeDescriptor::keyProjection, marshalMultiKeyRecord(), StandardTypeDescriptorFactory::newDataType(), NULL_PAGE_ID, CacheTestBase::pCache, SegStorageTestBase::pRandomSegment, SegStorageTestBase::pSegmentFactory, readKey(), readMultiKeyValue(), readSecondKey(), record, recordBuf, BTreeDescriptor::rootPageId, BTreeReader::searchForKey(), BTreeTest::Record::secondKey, STANDARD_TYPE_INT_32, tupleAccessor, tupleData, BTreeDescriptor::tupleDescriptor, and BTreeTest::Record::value.

Referenced by testBigMultiKeySearches(), and testSmallMultiKeySearches().

00495 {
00496     // Reset the key to a descriptor with one key
00497     StandardTypeDescriptorFactory stdTypeFactory;
00498     TupleAttributeDescriptor attrDesc(
00499         stdTypeFactory.newDataType(STANDARD_TYPE_INT_32));
00500     descriptor.tupleDescriptor.clear();
00501     descriptor.tupleDescriptor.push_back(attrDesc);
00502     descriptor.tupleDescriptor.push_back(attrDesc);
00503     descriptor.keyProjection.clear();
00504     descriptor.keyProjection.push_back(0);
00505 
00506     // Add one additional key
00507     descriptor.tupleDescriptor.push_back(attrDesc);
00508     descriptor.keyProjection.push_back(1);
00509 
00510     tupleAccessor.compute(descriptor.tupleDescriptor);
00511     recordBuf.reset(new FixedBuffer[tupleAccessor.getMaxByteCount()]);
00512 
00513     // The first index key will contain nKey1 distinct values with the second
00514     // key sequencing from 0 to nKey2-1
00515     descriptor.rootPageId = NULL_PAGE_ID;
00516     BTreeBuilder builder(descriptor,pRandomSegment);
00517 
00518     tupleData.compute(descriptor.tupleDescriptor);
00519 
00520     builder.createEmptyRoot();
00521     descriptor.rootPageId = builder.getRootPageId();
00522 
00523     SegmentAccessor scratchAccessor = pSegmentFactory->newScratchSegment(
00524         pCache,
00525         1);
00526 
00527     BTreeWriter writer(descriptor,scratchAccessor,false);
00528 
00529     for (uint i = 0; i < nKey1; i++) {
00530         for (uint j = 0; j < nKey2; j++) {
00531             record.key = i;
00532             record.secondKey = j;
00533             record.value = i + j;
00534             marshalMultiKeyRecord();
00535             writer.insertTupleFromBuffer(recordBuf.get(), DUP_FAIL);
00536         }
00537     }
00538 
00539     // Search based on only the first key
00540     TupleDescriptor searchKeyDesc;
00541     searchKeyDesc.push_back(attrDesc);
00542     keyData.compute(searchKeyDesc);
00543     keyData[0].pData = reinterpret_cast<PConstBuffer>(&record.key);
00544 
00545     // First, try searching using DUP_SEEK_BEGIN, then DUP_SEEK_END mode
00546     BTreeReader reader(descriptor);
00547     for (uint i = 0; i < nKey1; ++i) {
00548         record.key = i;
00549 
00550         if (!reader.searchForKey(keyData,DUP_SEEK_BEGIN)) {
00551             BOOST_FAIL("Could not find begin key #" << i);
00552         }
00553         reader.getTupleAccessorForRead().unmarshal(tupleData);
00554         BOOST_CHECK_EQUAL(i,readKey());
00555         BOOST_CHECK_EQUAL(0,readSecondKey());
00556         BOOST_CHECK_EQUAL(i,readMultiKeyValue());
00557 
00558         // NOTE jvs 27-May-2007:  due to FNL-65, ignore bogus return
00559         // value for DUP_SEEK_END
00560         reader.searchForKey(keyData,DUP_SEEK_END);
00561 
00562         if (i == nKey1 - 1) {
00563             if (!reader.isSingular()) {
00564                 BOOST_FAIL(
00565                     "Should have reached end of tree for end key #" << i);
00566             }
00567         } else {
00568             reader.getTupleAccessorForRead().unmarshal(tupleData);
00569             BOOST_CHECK_EQUAL(i + 1,readKey());
00570             BOOST_CHECK_EQUAL(0,readSecondKey());
00571             BOOST_CHECK_EQUAL(i + 1,readMultiKeyValue());
00572         }
00573     }
00574     reader.endSearch();
00575 
00576     // Test the scenario where we delete the last key on a leaf page and
00577     // then reinsert it with a larger second key value forcing it into the
00578     // next leaf page.  Since we don't know which key is at the end of a
00579     // leaf page, delete/reinsert all of them.
00580     //
00581     // To make sure we can find the relocated keys, do the following types
00582     // of search:
00583     // 1) partial begin search
00584     // 2) partial end search
00585     // 3) end search on a non-existent full key
00586 
00587     TupleData multiKeyData;
00588     multiKeyData.compute(builder.getKeyDescriptor());
00589     multiKeyData[0].pData = reinterpret_cast<PConstBuffer>(&record.key);
00590     multiKeyData[1].pData = reinterpret_cast<PConstBuffer>(&record.secondKey);
00591     for (uint i = 0; i < nKey1; i++) {
00592         for (uint j = 0; j < nKey2; j++) {
00593             record.key = i;
00594             record.secondKey = j;
00595             if (!writer.searchForKey(multiKeyData,DUP_SEEK_ANY)) {
00596                 BOOST_FAIL("Could not find key #" << i);
00597             }
00598             writer.deleteCurrent();
00599 
00600             record.secondKey = j + nKey2;
00601             record.value = i + j + nKey2;
00602             marshalMultiKeyRecord();
00603             writer.insertTupleFromBuffer(recordBuf.get(), DUP_FAIL);
00604         }
00605     }
00606     writer.endSearch();
00607     for (uint i = 0; i < nKey1; i++) {
00608         record.key = i;
00609         if (!reader.searchForKey(keyData,DUP_SEEK_BEGIN)) {
00610             BOOST_FAIL("Could not find begin key #" << i);
00611         }
00612         reader.getTupleAccessorForRead().unmarshal(tupleData);
00613         BOOST_CHECK_EQUAL(i,readKey());
00614         BOOST_CHECK_EQUAL(nKey2,readSecondKey());
00615         BOOST_CHECK_EQUAL(i + nKey2,readMultiKeyValue());
00616 
00617         reader.searchForKey(keyData,DUP_SEEK_END);
00618 
00619         if (i == nKey1 - 1) {
00620             if (!reader.isSingular()) {
00621                 BOOST_FAIL(
00622                     "Should have reached end of tree for end key #" << i);
00623             }
00624         } else {
00625             reader.getTupleAccessorForRead().unmarshal(tupleData);
00626             BOOST_CHECK_EQUAL(i + 1,readKey());
00627             BOOST_CHECK_EQUAL(nKey2,readSecondKey());
00628             BOOST_CHECK_EQUAL(i + 1 + nKey2,readMultiKeyValue());
00629         }
00630 
00631         record.secondKey = 0;
00632         reader.searchForKey(multiKeyData,DUP_SEEK_END);
00633 
00634         reader.getTupleAccessorForRead().unmarshal(tupleData);
00635         BOOST_CHECK_EQUAL(i,readKey());
00636         BOOST_CHECK_EQUAL(nKey2,readSecondKey());
00637         BOOST_CHECK_EQUAL(i + nKey2,readMultiKeyValue());
00638     }
00639 }

void BTreeTest::testSmallMultiKeySearches (  )  [inline, private]

Definition at line 132 of file BTreeTest.cpp.

References testMultiKeySearches().

Referenced by BTreeTest().

00133     {
00134         // 200*4 records should be large enough to create several leaf pages
00135         testMultiKeySearches(200, 4);
00136     }

void BTreeTest::testBigMultiKeySearches (  )  [inline, private]

Definition at line 138 of file BTreeTest.cpp.

References testMultiKeySearches().

Referenced by BTreeTest().

00139     {
00140         // 4*20000 should be large enough to force splits of interior
00141         // btree nodes
00142         testMultiKeySearches(4, 20000);
00143     }

void BTreeTest::testCaseSetUp (  )  [virtual]

Equivalent to JUnit TestCase.setUp; this is called before each test case method is invoked.

Default is no-op.

Reimplemented from TestBase.

Definition at line 178 of file BTreeTest.cpp.

References DeviceMode::createNew, descriptor, SegStorageTestBase::openRandomSegment(), SegStorageTestBase::openStorage(), CacheTestBase::pCache, SegmentAccessor::pCacheAccessor, SegStorageTestBase::pRandomSegment, SegmentAccessor::pSegment, and BTreeDescriptor::segmentAccessor.

void BTreeTest::testCaseTearDown (  )  [virtual]

Equivalent to JUnit TestCase.tearDown; this is called after each test case method is invoked.

Default is no-op.

Reimplemented from CacheTestBase.

Definition at line 187 of file BTreeTest.cpp.

References descriptor, SegmentAccessor::reset(), BTreeDescriptor::segmentAccessor, and CacheTestBase::testCaseTearDown().

void SegStorageTestBase::openStorage ( DeviceMode  openMode  )  [virtual, inherited]

Reimplemented from CacheTestBase.

Reimplemented in SegmentTestBase.

Definition at line 31 of file SegStorageTestBase.cpp.

References SegStorageTestBase::openSegmentStorage(), and CacheTestBase::openStorage().

Referenced by SegStorageTestBase::openRandomSegment(), SegmentTestBase::openStorage(), LhxHashTableTest::testCaseSetUp(), ExecStreamTestBase::testCaseSetUp(), testCaseSetUp(), BTreeReadersTest::testCaseSetUp(), LbmEntryTest::testCaseSetUp(), SegPageIterTest::testIter(), SegPageEntryIterTest::testIter(), SegStreamTest::testMarkReset(), SegStreamTest::testReadSeg(), LogicalTxnTest::testTxn(), SegStreamTest::testWriteSeg(), and SegStreamTest::testWriteSpillAndRead().

00032 {
00033     CacheTestBase::openStorage(openMode);
00034     openSegmentStorage(openMode);
00035 }

void SegStorageTestBase::openSegmentStorage ( DeviceMode  openMode  )  [virtual, inherited]

Reimplemented in LinearViewSegmentTest, SnapshotSegmentTestBase, and VersionedSegmentTest.

Definition at line 37 of file SegStorageTestBase.cpp.

References CacheTestBase::cbPageFull, DeviceMode::create, SegStorageTestBase::createLinearDeviceSegment(), CacheTestBase::dataDeviceId, SegStorageTestBase::pLinearSegment, and CacheTestBase::pRandomAccessDevice.

Referenced by VersionedSegmentTest::openSegmentStorage(), and SegStorageTestBase::openStorage().

00038 {
00039     pLinearSegment = createLinearDeviceSegment(
00040         dataDeviceId,
00041         openMode.create ? 0
00042         : pRandomAccessDevice->getSizeInBytes() / cbPageFull);
00043 }

void SegStorageTestBase::openRandomSegment (  )  [virtual, inherited]

Reimplemented in LcsClusterReplaceExecStreamTest.

Definition at line 45 of file SegStorageTestBase.cpp.

References SegStorageTestBase::closeStorage(), DeviceMode::load, SegStorageTestBase::openStorage(), SegStorageTestBase::pLinearSegment, SegStorageTestBase::pRandomSegment, and SegStorageTestBase::pSegmentFactory.

Referenced by RandomAllocationSegmentTest::testAllocateAndDeallocate(), LhxHashTableTest::testCaseSetUp(), ExecStreamUnitTestBase::testCaseSetUp(), testCaseSetUp(), and BTreeReadersTest::testCaseSetUp().

00046 {
00047     // reopen will interpret pages as already allocated, which
00048     // is what RandomAllocationSegment expects
00049     closeStorage();
00050     openStorage(DeviceMode::load);
00051     pRandomSegment = pSegmentFactory->newRandomAllocationSegment(
00052         pLinearSegment, true);
00053     pLinearSegment.reset();
00054 }

SharedSegment SegStorageTestBase::createLinearDeviceSegment ( DeviceId  deviceId,
uint  nPages 
) [inherited]

Definition at line 56 of file SegStorageTestBase.cpp.

References LinearDeviceSegmentParams::firstBlockId, LinearDeviceSegmentParams::nPagesAllocated, LinearDeviceSegmentParams::nPagesMin, CacheTestBase::pCache, SegStorageTestBase::pSegmentFactory, CompoundId::setBlockNum(), and CompoundId::setDeviceId().

Referenced by VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), SegStorageTestBase::openSegmentStorage(), and LinearViewSegmentTest::openSegmentStorage().

00058 {
00059     BlockId blockId(0);
00060     CompoundId::setDeviceId(blockId,deviceId);
00061     CompoundId::setBlockNum(blockId,0);
00062     LinearDeviceSegmentParams deviceParams;
00063     deviceParams.firstBlockId = blockId;
00064     deviceParams.nPagesMin = nPages;
00065     deviceParams.nPagesAllocated = nPages;
00066     return pSegmentFactory->newLinearDeviceSegment(
00067         pCache,deviceParams);
00068 }

void SegStorageTestBase::closeLinearSegment (  )  [inherited]

Definition at line 70 of file SegStorageTestBase.cpp.

References SegStorageTestBase::pLinearSegment.

Referenced by VersionedSegmentTest::closeStorage(), SnapshotSegmentTestBase::closeStorage(), SegStorageTestBase::closeStorage(), and SnapshotSegmentTest::testUncommittedReads().

00071 {
00072     if (pLinearSegment) {
00073         assert(pLinearSegment.unique());
00074         pLinearSegment.reset();
00075     }
00076 }

void SegStorageTestBase::closeRandomSegment (  )  [inherited]

Definition at line 78 of file SegStorageTestBase.cpp.

References SegStorageTestBase::pRandomSegment.

Referenced by VersionedSegmentTest::closeStorage(), and SegStorageTestBase::closeStorage().

00079 {
00080     if (pRandomSegment) {
00081         assert(pRandomSegment.unique());
00082         pRandomSegment.reset();
00083     }
00084 }

void SegStorageTestBase::closeVersionedRandomSegment (  )  [inherited]

Definition at line 86 of file SegStorageTestBase.cpp.

References SegStorageTestBase::pVersionedRandomSegment.

Referenced by SnapshotSegmentTestBase::closeStorage(), and SegStorageTestBase::closeStorage().

00087 {
00088     if (pVersionedRandomSegment) {
00089         assert(pVersionedRandomSegment.unique());
00090         pVersionedRandomSegment.reset();
00091     }
00092 }

void SegStorageTestBase::closeSnapshotRandomSegment (  )  [inherited]

Definition at line 94 of file SegStorageTestBase.cpp.

References SegStorageTestBase::pSnapshotRandomSegment.

Referenced by SnapshotSegmentTestBase::closeStorage().

00095 {
00096     if (pSnapshotRandomSegment) {
00097         assert(pSnapshotRandomSegment.unique());
00098         pSnapshotRandomSegment.reset();
00099     }
00100 }

void SegStorageTestBase::closeStorage (  )  [virtual, inherited]

Reimplemented from CacheTestBase.

Reimplemented in SnapshotSegmentTestBase, and VersionedSegmentTest.

Definition at line 102 of file SegStorageTestBase.cpp.

References SegStorageTestBase::closeLinearSegment(), SegStorageTestBase::closeRandomSegment(), CacheTestBase::closeStorage(), and SegStorageTestBase::closeVersionedRandomSegment().

Referenced by VersionedSegmentTest::closeStorage(), SnapshotSegmentTestBase::closeStorage(), SegStorageTestBase::openRandomSegment(), SegPageIterTest::testIter(), SegPageEntryIterTest::testIter(), SegStreamTest::testMarkReset(), SegStreamTest::testReadSeg(), SegmentTestBase::testSingleThread(), SegStreamTest::testWriteSeg(), and SegStreamTest::testWriteSpillAndRead().

00103 {
00104     closeLinearSegment();
00105     closeRandomSegment();
00106     closeVersionedRandomSegment();
00107     // TODO:  assert pSegmentFactory.unique(), but not here
00108     CacheTestBase::closeStorage();
00109 }

Cache & CacheTestBase::getCache (  )  [inherited]

Definition at line 42 of file CacheTestBase.cpp.

References CacheTestBase::pCache.

Referenced by CacheTest::lockPage(), CacheTest::prefetchBatch(), SegmentTestBase::prefetchPage(), CacheTest::prefetchPage(), PagingTestBase::testCacheResize(), PagingTestBase::testCheckpoint(), PagingTestBase::testOp(), PagingTestBase::testScratch(), SegmentTestBase::unlockPage(), and CacheTest::unlockPage().

00043 {
00044     return *pCache;
00045 }

SharedCache CacheTestBase::newCache (  )  [virtual, inherited]

Definition at line 66 of file CacheTestBase.cpp.

References CacheTestBase::cacheParams, Cache::newCache(), CacheTestBase::victimLRU, CacheTestBase::victimPolicy, CacheTestBase::victimRandom, and CacheTestBase::victimTwoQ.

Referenced by CacheTestBase::openStorage().

00067 {
00068     switch (victimPolicy) {
00069     case victimRandom:
00070         return SharedCache(
00071             new RandomCache(cacheParams),
00072             ClosableObjectDestructor());
00073     case victimLRU:
00074         return SharedCache(
00075             new LRUCache(cacheParams),
00076             ClosableObjectDestructor());
00077     case victimTwoQ:
00078         return Cache::newCache(cacheParams);
00079     default:
00080         permAssert(false);
00081     }
00082 }

SharedRandomAccessDevice CacheTestBase::openDevice ( std::string  devName,
DeviceMode  openMode,
uint  nDevicePages,
DeviceId  deviceId 
) [inherited]

Definition at line 84 of file CacheTestBase.cpp.

References CacheTestBase::cbPageFull, DeviceMode::create, CacheTestBase::pCache, and FileSystem::remove().

Referenced by VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), and CacheTestBase::openStorage().

00087 {
00088     if (openMode.create) {
00089         FileSystem::remove(devName.c_str());
00090     }
00091     SharedRandomAccessDevice pDevice(
00092         new RandomAccessFileDevice(devName,openMode));
00093     if (openMode.create) {
00094         pDevice->setSizeInBytes(nDevicePages*cbPageFull);
00095     }
00096     pCache->registerDevice(deviceId,pDevice);
00097     return pDevice;
00098 }

void CacheTestBase::closeDevice ( DeviceId  deviceId,
SharedRandomAccessDevice pDevice 
) [inherited]

Definition at line 130 of file CacheTestBase.cpp.

References CHECKPOINT_FLUSH_AND_UNMAP, and CacheTestBase::pCache.

Referenced by VersionedSegmentTest::closeStorage(), SnapshotSegmentTestBase::closeStorage(), and CacheTestBase::closeStorage().

00132 {
00133     if (!pDevice) {
00134         return;
00135     }
00136     DeviceIdPagePredicate pagePredicate(deviceId);
00137     pCache->checkpointPages(pagePredicate,CHECKPOINT_FLUSH_AND_UNMAP);
00138     pCache->unregisterDevice(deviceId);
00139     assert(pDevice.unique());
00140     pDevice.reset();
00141 }

void TestBase::snooze ( uint  nSeconds  )  [protected, inherited]

Definition at line 263 of file TestBase.cpp.

Referenced by DatabaseTest::executeForceTxn(), ThreadedTestBase::runThreadedTestCase(), PagingTestBase::testCacheResize(), BTreeTxnTest::testCheckpoint(), PagingTestBase::testCheckpointGuarded(), PagingTestBase::testPrefetch(), and PagingTestBase::testPrefetchBatch().

00264 {
00265 #ifdef __MSVC__
00266     ::_sleep(nSeconds*1000);
00267 #else
00268     ::sleep(nSeconds);
00269 #endif
00270 }

void TestBase::readParams ( int  argc,
char **  argv 
) [static, inherited]

Parses the command line.

format: [-v] [-t TEST | -all] {param=val}* [CONFIGFILE | -] Normally, the test program runs the default test cases. With the option "-all", runs the extra test cases as well. With the option "-t TEST", runs only the single test case named TEST. CONFIGFILE is read to load configuration parameters. Configuration parameters can also be set ad hoc, from the command line, as pairs name=val. These take precedence.

Definition at line 108 of file TestBase.cpp.

References TestBase::configMap, ConfigMap::dumpParams(), ConfigMap::isParamSet(), ConfigMap::mergeFrom(), TestBase::paramDictionaryFileName, ConfigMap::readParams(), TestBase::runAll, TestBase::runSingle, ConfigMap::setStringParam(), and verbose.

00109 {
00110     bool verbose = false;
00111     ConfigMap adhocMap;
00112 
00113     for (int i = 1; i < argc; ++i) {
00114         std::string arg = argv[i];
00115         if (argv[i][0] == '-') {
00116             if (arg == "-v") {
00117                 verbose = true;
00118             } else if (arg == "-") {
00119                 configMap.readParams(std::cin);
00120             } else if (arg == "-all") {
00121                 runAll = true;
00122             } else if (arg == "-t") {   // -t TEST
00123                 permAssert(i + 1 < argc);
00124                 runSingle = argv[++i];
00125             } else if (arg[1] == 't') { // allow -tTEST
00126                 runSingle = arg.substr(2);
00127             }
00128         } else {
00129             int i = arg.find("=");
00130             if ((0 < i) && (i < arg.size())) {
00131                 // an ad hoc parameter
00132                 std::string key = arg.substr(0,i);
00133                 std::string val = arg.substr(i + 1);
00134                 adhocMap.setStringParam(key,val);
00135             } else {
00136                 // a config file name
00137                 std::ifstream configFile(arg.c_str());
00138                 assert(configFile.good());
00139                 configMap.readParams(configFile);
00140             }
00141         }
00142     }
00143     configMap.mergeFrom(adhocMap);
00144 
00145     // set a default dictionary file location for use by tests that need a
00146     // small non-random sorted data set
00147     if (!configMap.isParamSet(paramDictionaryFileName)) {
00148         std::string dictFileName = "dictWords";
00149         configMap.setStringParam(paramDictionaryFileName,dictFileName);
00150     }
00151 
00152     if (verbose) {
00153         configMap.dumpParams(std::cout);
00154     }
00155 }

TestSuite * TestBase::releaseTestSuite (  )  [inherited]

Definition at line 157 of file TestBase.cpp.

References TestBase::TestCaseGroup::addAllToTestSuite(), TestBase::defaultTests, TestBase::extraTests, TestBase::TestCaseGroup::findTest(), TestBase::pTestObj, TestBase::pTestSuite, TestBase::runAll, TestBase::runSingle, and TestBase::testName.

00158 {
00159     assert(pTestObj);
00160     assert(pTestObj.use_count() > 1);
00161 
00162     // release self-reference now that all test cases have been registered
00163     pTestObj.reset();
00164 
00165     TestSuite* pTestSuite = BOOST_TEST_SUITE(testName.c_str());
00166 
00167     if (runSingle.size()) {
00168         test_unit *p =  defaultTests.findTest(runSingle);
00169         if (!p) {
00170             p = extraTests.findTest(runSingle);
00171         }
00172         if (!p) {
00173             std::cerr << "test " << runSingle << " not found\n";
00174             exit(2);
00175         }
00176         pTestSuite->add(p);
00177     } else {
00178         defaultTests.addAllToTestSuite(pTestSuite);
00179         if (runAll) {
00180             extraTests.addAllToTestSuite(pTestSuite);
00181         }
00182     }
00183     return pTestSuite;
00184 }

void TestBase::beforeTestCase ( std::string  testCaseName  )  [inherited]

Definition at line 214 of file TestBase.cpp.

References TestBase::configMap, TraceSource::initTraceSource(), AutoBacktrace::install(), TestBase::notifyTrace(), AutoBacktrace::setOutputStream(), AutoBacktrace::setTraceTarget(), TestBase::testName, and TRACE_INFO.

00215 {
00216     notifyTrace(testName,TRACE_INFO,"ENTER:  " + testCaseName);
00217 
00218     // Install the AutoBacktrace signal handler now, after
00219     // boost::execution_monitor::catch_signals() has installed its own, so that
00220     // on SIGABRT AutoBacktrace goes first, prints the backtrace, then chains
00221     // to boost, which handles the error.
00222     AutoBacktrace::setOutputStream();
00223     AutoBacktrace::setTraceTarget(shared_from_this());
00224     AutoBacktrace::install();
00225     configMap.initTraceSource(shared_from_this(), "testConfig");
00226 }

void TestBase::afterTestCase ( std::string  testCaseName  )  [inherited]

Definition at line 228 of file TestBase.cpp.

References TestBase::configMap, TraceSource::disableTracing(), TestBase::notifyTrace(), AutoBacktrace::setTraceTarget(), TestBase::testName, and TRACE_INFO.

00229 {
00230     AutoBacktrace::setTraceTarget();
00231     configMap.disableTracing();
00232     notifyTrace(testName,TRACE_INFO,"LEAVE:  " + testCaseName);
00233 }

void TestBase::notifyTrace ( std::string  source,
TraceLevel  level,
std::string  message 
) [virtual, inherited]

Receives notification when a trace event occurs.

Parameters:
source the facility from which the message originated
level the trace event severity level
message the text of the message

Implements TraceTarget.

Definition at line 243 of file TestBase.cpp.

References TestBase::traceFile, TestBase::traceMutex, TestBase::traceStdout, and TestBase::traceStream.

Referenced by TestBase::afterTestCase(), and TestBase::beforeTestCase().

00244 {
00245     if (traceFile || traceStdout) {
00246         StrictMutexGuard traceMutexGuard(traceMutex);
00247         if (traceFile) {
00248             traceStream << "[" << source << "] " << message << std::endl;
00249             traceStream.flush();
00250         }
00251         if (traceStdout) {
00252             std::cout << "[" << source << "] " << message << std::endl;
00253             std::cout.flush();
00254         }
00255     }
00256 }

TraceLevel TestBase::getSourceTraceLevel ( std::string  source  )  [virtual, inherited]

Gets the level at which a particular source should be traced.

Parameters:
source name of source to be traced
Returns:
minimum severity level which should be traced

Implements TraceTarget.

Definition at line 258 of file TestBase.cpp.

References TestBase::traceLevel.

Referenced by LbmExecStreamTestBase::generateBitmaps().

00259 {
00260     return traceLevel;
00261 }


Member Data Documentation

BTreeDescriptor BTreeTest::descriptor [private]

Definition at line 61 of file BTreeTest.cpp.

Referenced by BTreeTest(), testBulkLoad(), testCaseSetUp(), testCaseTearDown(), testInserts(), testMultiKeySearches(), testScan(), testSearch(), testSearchLast(), and verifyTree().

TupleAccessor BTreeTest::tupleAccessor [private]

Definition at line 63 of file BTreeTest.cpp.

Referenced by BTreeTest(), marshalMultiKeyRecord(), marshalRecord(), testBulkLoad(), testMultiKeySearches(), and unmarshalRecord().

TupleData BTreeTest::keyData [private]

Definition at line 64 of file BTreeTest.cpp.

Referenced by testBulkLoad(), testInserts(), testMultiKeySearches(), and testSearch().

TupleData BTreeTest::tupleData [private]

Definition at line 65 of file BTreeTest.cpp.

Referenced by BTreeTest(), marshalMultiKeyRecord(), marshalRecord(), readKey(), readMultiKeyValue(), readSecondKey(), readValue(), testInserts(), testMultiKeySearches(), testScan(), testSearch(), and unmarshalRecord().

Record BTreeTest::record [private]

Definition at line 66 of file BTreeTest.cpp.

Referenced by marshalMultiKeyRecord(), marshalRecord(), testBulkLoad(), testInserts(), testMultiKeySearches(), testScan(), testSearch(), and unmarshalRecord().

boost::scoped_array<FixedBuffer> BTreeTest::recordBuf [private]

Definition at line 67 of file BTreeTest.cpp.

Referenced by BTreeTest(), marshalMultiKeyRecord(), marshalRecord(), testBulkLoad(), testInserts(), and testMultiKeySearches().

SharedSegmentFactory SegStorageTestBase::pSegmentFactory [protected, inherited]

Definition at line 40 of file SegStorageTestBase.h.

Referenced by BackupRestoreTest::backup(), SegStorageTestBase::createLinearDeviceSegment(), LogicalTxnTest::createRecoveryLog(), LbmSearchTest::initBTreeExecStreamParam(), LbmLoadBitmapTest::initBTreeExecStreamParam(), LcsClusterReplaceExecStreamTest::initClusterAppendParams(), LbmExecStreamTestBase::initSorterExecStream(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), LbmMinusExecStreamTest::newMinusStream(), ExecStreamTestBase::newStreamGraphEmbryo(), SegStorageTestBase::openRandomSegment(), VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), BackupRestoreTest::restore(), SegStorageTestBase::SegStorageTestBase(), LbmSplicerExecStreamTest::spliceInput(), ExecStreamTestSuite::testBTreeInsertExecStream(), LhxHashTableTest::testCaseSetUp(), LcsClusterReplaceExecStreamTest::testClusterReplace(), LhxAggExecStreamTest::testCountImpl(), ExecStreamTestSuite::testDoubleBufferExecStream(), ExecStreamGovernorTest::testGovernor(), LhxAggExecStreamTest::testGroupCountImpl(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), testInserts(), LbmIntersectExecStreamTest::testIntersect(), LbmEntryTest::testldb35(), LbmEntryTest::testler5920(), LbmLoadBitmapTest::testLoad(), LcsClusterAppendExecStreamTest::testLoadMultiCol(), LcsClusterAppendExecStreamTest::testLoadSingleCol(), LbmEntryTest::testMergeEntry(), testMultiKeySearches(), testScan(), ExecStreamTestSuite::testScratchBufferExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), FlatFileExecStreamTest::testStream(), LhxAggExecStreamTest::testSumImpl(), LogicalTxnTest::testTxn(), SnapshotSegmentTest::testUncommittedReads(), LbmUnionExecStreamTest::testUnion(), SegStreamTest::testWriteSpillAndRead(), and LbmEntryTest::testZeroBytes().

SharedSegment SegStorageTestBase::pLinearSegment [protected, inherited]

Segment supporting linear page allocation.

Definition at line 45 of file SegStorageTestBase.h.

Referenced by SegStorageTestBase::closeLinearSegment(), LogicalTxnTest::createRecoveryLog(), SegmentTestBase::lockPage(), SegStorageTestBase::openRandomSegment(), VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), SegStorageTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), SegmentTestBase::openStorage(), SegmentTestBase::prefetchPage(), SnapshotSegmentTestBase::testAllocateAll(), LinearViewSegmentTest::testAllocateAll(), VersionedSegmentTest::testCheckpoint(), SegmentTestBase::testCheckpoint(), SegPageIterTest::testIter(), SegPageEntryIterTest::testIter(), SegStreamTest::testMarkReset(), SegStreamTest::testReadSeg(), VersionedSegmentTest::testRecovery(), LogicalTxnTest::testTxn(), SnapshotSegmentTest::testUncommittedReads(), SegStreamTest::testWriteSeg(), and VersionedSegmentTest::verifyPage().

SharedSegment SegStorageTestBase::pRandomSegment [protected, inherited]

(Optional) segment supporting random page allocation.

Definition at line 50 of file SegStorageTestBase.h.

Referenced by SegStorageTestBase::closeRandomSegment(), SnapshotSegmentTestBase::closeStorage(), LbmSplicerExecStreamTest::createBTree(), LbmSplicerExecStreamTest::initBTreeParam(), LbmSearchTest::initBTreeParam(), LbmLoadBitmapTest::initBTreeParam(), LbmLoadBitmapTest::initBTreeTupleDesc(), LcsClusterReplaceExecStreamTest::initClusterAppendParams(), LbmExecStreamTestBase::initSorterExecStream(), LcsClusterReplaceExecStreamTest::loadCluster(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), SegStorageTestBase::openRandomSegment(), SnapshotSegmentTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), SegmentTestBase::openStorage(), SegmentTestBase::testAllocate(), RandomAllocationSegmentTest::testAllocateAndDeallocate(), ExecStreamTestSuite::testBTreeInsertExecStream(), testBulkLoad(), LhxHashTableTest::testCaseSetUp(), testCaseSetUp(), BTreeReadersTest::testCaseSetUp(), LcsRowScanExecStreamTest::testCaseSetUp(), LcsMultiClusterAppendTest::testCaseSetUp(), LcsClusterReplaceExecStreamTest::testCaseSetUp(), LcsClusterAppendExecStreamTest::testCaseSetUp(), LbmExecStreamTestBase::testCaseSetUp(), LcsClusterReplaceExecStreamTest::testClusterReplace(), LhxAggExecStreamTest::testCountImpl(), SegmentTestBase::testDeallocate(), LhxAggExecStreamTest::testGroupCountImpl(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), testInserts(), LbmLoadBitmapTest::testLoad(), LcsClusterAppendExecStreamTest::testLoadMultiCol(), LcsClusterAppendExecStreamTest::testLoadSingleCol(), ExecStreamTestSuite::testMergeImplicitPullInputs(), testMultiKeySearches(), BTreeReadersTest::testReaders(), LcsRowScanExecStreamTest::testScanOnEmptyCluster(), ExecStreamTestSuite::testSegBufferExecStream(), ExecStreamTestSuite::testSegBufferReaderWriterExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), LhxAggExecStreamTest::testSumImpl(), and LbmUnionExecStreamTest::testUnion().

SharedSegment SegStorageTestBase::pVersionedRandomSegment [protected, inherited]

(Optional) segment supporting versioned random page allocation.

Definition at line 55 of file SegStorageTestBase.h.

Referenced by BackupRestoreTest::backup(), SnapshotSegmentTestBase::closeStorage(), SegStorageTestBase::closeVersionedRandomSegment(), SnapshotSegmentTest::deallocateOldPages(), SnapshotSegmentTestBase::openSegmentStorage(), BackupRestoreTest::restore(), LcsClusterReplaceExecStreamTest::testClusterReplace(), SnapshotSegmentTest::testRollback(), and SnapshotSegmentTest::testUncommittedReads().

SharedSegment SegStorageTestBase::pSnapshotRandomSegment [protected, inherited]

(Optional) segment supporting snapshot random page allocation.

Definition at line 60 of file SegStorageTestBase.h.

Referenced by SegStorageTestBase::closeSnapshotRandomSegment(), SnapshotSegmentTestBase::commitChanges(), SnapshotSegmentTestBase::openSegmentStorage(), LcsClusterReplaceExecStreamTest::testClusterReplace(), and SnapshotSegmentTest::testDeallocateOld().

VictimPolicy CacheTestBase::victimPolicy [protected, inherited]

VictimPolicy to instantiate.

Definition at line 53 of file CacheTestBase.h.

Referenced by CacheTestBase::CacheTestBase(), and CacheTestBase::newCache().

CacheParams CacheTestBase::cacheParams [protected, inherited]

Parameters for cache initialization.

Definition at line 58 of file CacheTestBase.h.

Referenced by CacheTestBase::CacheTestBase(), CacheTestBase::newCache(), BackupRestoreTest::testBackupCleanup(), BackupRestoreTest::testHeaderBackupRestore(), and SegPageEntryIterTest::testIter().

SharedCache CacheTestBase::pCache [protected, inherited]

Cache instance being tested.

Definition at line 63 of file CacheTestBase.h.

Referenced by BackupRestoreTest::backup(), CacheTestBase::closeDevice(), CacheTestBase::closeStorage(), LbmSplicerExecStreamTest::createBTree(), SegStorageTestBase::createLinearDeviceSegment(), LogicalTxnTest::createRecoveryLog(), BackupRestoreTest::createSnapshotData(), BackupRestoreTest::executeSnapshotTxn(), CacheTestBase::getCache(), LbmSearchTest::initBTreeExecStreamParam(), LbmLoadBitmapTest::initBTreeExecStreamParam(), LbmSearchTest::initBTreeParam(), LbmLoadBitmapTest::initBTreeParam(), LcsClusterReplaceExecStreamTest::initClusterAppendParams(), LbmExecStreamTestBase::initSorterExecStream(), LcsClusterReplaceExecStreamTest::loadCluster(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), SegmentTestBase::lockPage(), LbmMinusExecStreamTest::newMinusStream(), ExecStreamTestBase::newStreamGraphEmbryo(), CacheTestBase::openDevice(), CacheTestBase::openStorage(), LcsClusterReplaceExecStreamTest::replaceCluster(), BackupRestoreTest::restore(), LbmSplicerExecStreamTest::spliceInput(), SegmentTestBase::testAllocate(), RandomAllocationSegmentTest::testAllocateAndDeallocate(), BackupRestoreTest::testBackupCleanup(), ExecStreamTestSuite::testBTreeInsertExecStream(), testBulkLoad(), LhxHashTableTest::testCaseSetUp(), ExecStreamUnitTestBase::testCaseSetUp(), testCaseSetUp(), BTreeReadersTest::testCaseSetUp(), LhxAggExecStreamTest::testCountImpl(), SegmentTestBase::testDeallocate(), SnapshotSegmentTest::testDeallocateOld(), ExecStreamTestSuite::testDoubleBufferExecStream(), ExecStreamGovernorTest::testGovernor(), LhxAggExecStreamTest::testGroupCountImpl(), BackupRestoreTest::testHeaderBackupRestore(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), testInserts(), LbmIntersectExecStreamTest::testIntersect(), SegPageIterTest::testIter(), SegPageEntryIterTest::testIter(), CacheTest::testLargeCacheInit(), CacheTest::testLargeCacheRequest(), LbmEntryTest::testldb35(), LbmEntryTest::testler5920(), LbmLoadBitmapTest::testLoad(), LcsClusterAppendExecStreamTest::testLoadMultiCol(), LcsClusterAppendExecStreamTest::testLoadSingleCol(), SegStreamTest::testMarkReset(), LbmEntryTest::testMergeEntry(), testMultiKeySearches(), CacheTest::testQuotaCacheAccessor(), BTreeReadersTest::testReaders(), SegStreamTest::testReadSeg(), testScan(), LcsRowScanExecStreamTest::testScanOnEmptyCluster(), ExecStreamTestSuite::testScratchBufferExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), FlatFileExecStreamTest::testStream(), LhxAggExecStreamTest::testSumImpl(), LogicalTxnTest::testTxn(), LogicalTxnTest::testTxnIdSequence(), LbmUnionExecStreamTest::testUnion(), SegStreamTest::testWriteSeg(), SegStreamTest::testWriteSpillAndRead(), LbmEntryTest::testZeroBytes(), and BackupRestoreTest::verifySnapshotData().

SharedRandomAccessDevice CacheTestBase::pRandomAccessDevice [protected, inherited]

The default cached device.

Definition at line 68 of file CacheTestBase.h.

Referenced by BackupRestoreTest::backup(), CacheTestBase::closeStorage(), SegStorageTestBase::openSegmentStorage(), CacheTestBase::openStorage(), and BackupRestoreTest::restore().

uint CacheTestBase::nMemPages [protected, inherited]

Size of cache in memory pages.

Definition at line 73 of file CacheTestBase.h.

Referenced by CacheTestBase::CacheTestBase(), PagingTestBase::testCacheResize(), and ExecStreamTestBase::testCaseSetUp().

uint CacheTestBase::nDiskPages [protected, inherited]

Size of device in disk pages.

Definition at line 78 of file CacheTestBase.h.

Referenced by CacheTestBase::CacheTestBase(), LinearViewSegmentTest::LinearViewSegmentTest(), CacheTest::makeBlockId(), VersionedSegmentTest::openSegmentStorage(), SnapshotSegmentTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), CacheTestBase::openStorage(), SegStreamTest::SegStreamTest(), SnapshotSegmentTestBase::SnapshotSegmentTestBase(), SnapshotSegmentTest::testDeallocateOld(), PagingTestBase::testPrefetch(), PagingTestBase::testPrefetchBatch(), PagingTestBase::testRandomOp(), SnapshotSegmentTest::testRollback(), PagingTestBase::testSequentialOp(), and PagingTestBase::testSkipOp().

uint CacheTestBase::cbPageFull [protected, inherited]

Disk page size.

Definition at line 83 of file CacheTestBase.h.

Referenced by CacheTest::CacheTest(), CacheTestBase::CacheTestBase(), CacheTestBase::openDevice(), and SegStorageTestBase::openSegmentStorage().

DeviceId CacheTestBase::dataDeviceId [protected, inherited]

Fixed ID to assign to data device.

Definition at line 88 of file CacheTestBase.h.

Referenced by CacheTestBase::CacheTestBase(), CacheTestBase::closeStorage(), CacheTest::makeBlockId(), SnapshotSegmentTestBase::openSegmentStorage(), SegStorageTestBase::openSegmentStorage(), LinearViewSegmentTest::openSegmentStorage(), CacheTestBase::openStorage(), and PagingTestBase::testCheckpoint().

TestSuite* TestBase::pTestSuite [protected, inherited]

Boost test suite.

Definition at line 59 of file TestBase.h.

Referenced by TestBase::releaseTestSuite().

boost::shared_ptr<TestBase> TestBase::pTestObj [protected, inherited]

Definition at line 61 of file TestBase.h.

Referenced by TestBase::releaseTestSuite(), and TestBase::TestBase().

std::ofstream TestBase::traceStream [protected, inherited]

Output file stream for tracing.

Definition at line 66 of file TestBase.h.

Referenced by TestBase::notifyTrace(), TestBase::TestBase(), and TestBase::~TestBase().

StrictMutex TestBase::traceMutex [protected, inherited]

Protects traceStream.

Definition at line 71 of file TestBase.h.

Referenced by TestBase::notifyTrace().

std::string TestBase::testName [protected, inherited]

Name of test.

Definition at line 76 of file TestBase.h.

Referenced by TestBase::afterTestCase(), TestBase::beforeTestCase(), TestBase::releaseTestSuite(), TestBase::TestBase(), LhxHashTableTest::testInsert1Ka(), and LhxHashTableTest::testInsert1Kb().

TraceLevel TestBase::traceLevel [protected, inherited]

Level at which to trace test execution.

Definition at line 81 of file TestBase.h.

Referenced by TestBase::getSourceTraceLevel(), and TestBase::TestBase().

FileStatsTarget TestBase::statsTarget [protected, inherited]

Output for stats.

Definition at line 86 of file TestBase.h.

StatsTimer TestBase::statsTimer [protected, inherited]

Timer for stats collection.

Definition at line 91 of file TestBase.h.

Referenced by CacheTestBase::closeStorage(), CacheTestBase::openStorage(), BTreeTxnTest::testCaseSetUp(), BTreeTxnTest::testCaseTearDown(), and BTreeTxnTest::testTxns().

bool TestBase::traceStdout [protected, inherited]

Copy trace output to stdout.

Definition at line 99 of file TestBase.h.

Referenced by TestBase::notifyTrace(), and TestBase::TestBase().

bool TestBase::traceFile [protected, inherited]

Copy trace output to file.

Definition at line 104 of file TestBase.h.

Referenced by TestBase::notifyTrace(), and TestBase::TestBase().

bool TestBase::runAll [static, protected, inherited]

Run all test cases, including the extra tests.

(static, since set by readParams())

Definition at line 110 of file TestBase.h.

Referenced by TestBase::readParams(), and TestBase::releaseTestSuite().

std::string TestBase::runSingle [static, protected, inherited]

Run only the test case of this name.

(static, since set by readParams())

Definition at line 116 of file TestBase.h.

Referenced by TestBase::readParams(), and TestBase::releaseTestSuite().

TestCaseGroup TestBase::defaultTests [protected, inherited]

Definition at line 139 of file TestBase.h.

Referenced by TestBase::releaseTestSuite().

TestCaseGroup TestBase::extraTests [protected, inherited]

Definition at line 140 of file TestBase.h.

Referenced by TestBase::releaseTestSuite().

ParamName TestBase::paramTestSuiteName [static, inherited]

Definition at line 143 of file TestBase.h.

Referenced by TestBase::TestBase().

ParamName TestBase::paramTraceFileName [static, inherited]

Definition at line 144 of file TestBase.h.

Referenced by TestBase::TestBase().

ParamName TestBase::paramDictionaryFileName [static, inherited]

Definition at line 145 of file TestBase.h.

Referenced by TestBase::readParams(), SegStreamTest::testRead(), and SegStreamTest::testWrite().

ParamName TestBase::paramTraceLevel [static, inherited]

Definition at line 146 of file TestBase.h.

Referenced by TestBase::TestBase().

ParamName TestBase::paramStatsFileName [static, inherited]

Definition at line 147 of file TestBase.h.

ParamName TestBase::paramTraceStdout [static, inherited]

Definition at line 148 of file TestBase.h.

Referenced by TestBase::TestBase().

ParamName TestBase::paramDegreeOfParallelism [static, inherited]

Definition at line 149 of file TestBase.h.

Referenced by ParallelExecStreamSchedulerTest::ParallelExecStreamSchedulerTest().

ConfigMap TestBase::configMap [static, inherited]

Configuration parameters.

The reason this is static is so that no constructor parameters (which burden virtual bases) are needed.

Definition at line 155 of file TestBase.h.

Referenced by TestBase::afterTestCase(), TestBase::beforeTestCase(), BTreeTxnTest::BTreeTxnTest(), CacheTestBase::CacheTestBase(), BackupRestoreTest::createSnapshotData(), DatabaseTest::DatabaseTest(), TestOptionsTest::extra(), DatabaseTest::loadDatabase(), SparseBitmapTest::openStorage(), PagingTestBase::PagingTestBase(), ParallelExecStreamSchedulerTest::ParallelExecStreamSchedulerTest(), RandomAccessFileDeviceTest::RandomAccessFileDeviceTest(), TestBase::readParams(), SegStorageTestBase::SegStorageTestBase(), TestOptionsTest::test1(), TestOptionsTest::test2(), BackupRestoreTest::testBackupCleanup(), TestBase::TestBase(), BTreeTxnTest::testCaseSetUp(), BTreeTxnTest::testCheckpoint(), DatabaseTest::testCreateEmpty(), DatabaseTest::testForceTxns(), BackupRestoreTest::testHeaderBackupRestore(), SegPageEntryIterTest::testIter(), SegStreamTest::testRead(), BTreeTxnTest::testTxns(), SegStreamTest::testWrite(), ThreadedTestBase::ThreadedTestBase(), and TestBase::~TestBase().


The documentation for this class was generated from the following file:
Generated on Mon Jun 22 04:00:26 2009 for Fennel by  doxygen 1.5.1