public abstract class AbstractMROWTestCase extends AbstractRawStoreTestCase
Supporting MROW is easy for a fully buffered implementation since it need
only use a read-only view for readers. If the implementation is not fully
buffered, e.g., DiskOnlyStrategy
, then it needs to serialize reads
that are not buffered. The exception as always is the
MappedBufferStrategy
- since this uses the nio
MappedByteBuffer
it supports concurrent readers using the same
approach as a fully buffered strategy even though data may not always reside
in memory.
IMROW
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMROWTestCase.ReaderTask
Run a reader.
|
static class |
AbstractMROWTestCase.Record
A ground truth record as generated by a
AbstractMROWTestCase.WriterTask . |
static class |
AbstractMROWTestCase.WriterTask
Run a writer.
|
TestCase2.MyProperties, TestCase2.RandomType
r
_randomType, log
Constructor and Description |
---|
AbstractMROWTestCase() |
AbstractMROWTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
static void |
doMROWTest(IRawStore store,
long nwrites,
long writeDelayMillis,
long timeout,
int nclients,
long ntrials,
int reclen,
long nreads,
AtomicInteger nerr,
boolean readAll)
A correctness/stress/performance test with a pool of concurrent clients
designed to verify MROW operations.
|
static void |
main(String[] args)
Correctness/stress/performance test for MROW behavior.
|
void |
testMROW()
Correctness/stress test verifies that the implementation supports
Multiple Readers One Writer (MROW).
|
getRandomData, getStore, test_close, test_multipleWrites, test_read_correctRejection_0L, test_read_correctRejection_zeroLength, test_readImmutable, test_write_correctRejection_emptyRecord, test_write_correctRejection_null, test_writeImmutable, test_writeRead, test_writeReadRead, testBlobObjectStreams, testEmptyStream, testSimpleStringStream, testSimpleStringStreamFromStandardAllocation, testZipStreams
assertCondition, assertCondition, assertEquals, assertEquals, getBytes, getPort, getRandomData, getRandomData, setUp, tearDown
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, toString
public AbstractMROWTestCase()
public AbstractMROWTestCase(String name)
name
- public void testMROW() throws Exception
Exception
public static void doMROWTest(IRawStore store, long nwrites, long writeDelayMillis, long timeout, int nclients, long ntrials, int reclen, long nreads, AtomicInteger nerr, boolean readAll) throws Exception
StressTestConcurrentTx
is designed to reveal concurrency problems
in the higher level data structures (transaction process and especially
the indices).store
- The store.nwrites
- The #of records to write.writeDelayMillis
- The #of milliseconds delay between writes.timeout
- The timeout (seconds).nclients
- The #of concurrent clients.ntrials
- The #of distinct client trials to execute.reclen
- The length of the random byte[] records used in the
operations.nreads
- The #of operations to be performed in each transaction.nerr
- Used to report the #of errors back as a side-effect.readAll
- Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.