public abstract class AbstractRestartSafeTestCase extends AbstractBufferStrategyTestCase
TestCase2.MyProperties, TestCase2.RandomType
r
_randomType, log
Constructor and Description |
---|
AbstractRestartSafeTestCase() |
AbstractRestartSafeTestCase(String name) |
Modifier and Type | Method and Description |
---|---|
protected IRawStore |
reopenStore(IRawStore store)
Re-open the same backing store.
|
void |
test_abort()
Test of abort semantics.
|
void |
test_closeForWrites()
Unit tests writes some data, commits, and closes the journal against
future writes.
|
void |
test_restartSafe_multipleWrites()
Test writes a bunch of records and verifies that each can be read after
it is written.
|
void |
test_restartSafe_oneWrite()
Writes a record, verifies the write then commits the store.
|
void |
test_restartSafe_oneWriteNoCommit()
Writes a record, verifies the write but does NOT commit the store.
|
getBufferMode, getProperties, getStore, test_overflow, test_writeNoExtend, test_writeWithExtend, writeRandomData
getRandomData, 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, 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 AbstractRestartSafeTestCase()
public AbstractRestartSafeTestCase(String name)
protected IRawStore reopenStore(IRawStore store)
store
- the existing store.Throwable
- if the existing store is not closed, e.g., from failure to
obtain a file lock, etc.public void test_restartSafe_oneWriteNoCommit()
public void test_restartSafe_oneWrite()
public void test_restartSafe_multipleWrites()
public void test_abort()
public void test_closeForWrites()
LRUNexus
is then cleared and we verify that we
can still read data back from the store. Finally, we close and then
reopen the store in a read-only mode and verify that we can still read on
the store.
This test was written to verify that closing the journal against future
writes does not leave the write cache in an unusable state (e.g., if it
is discarded, then we do not attempt to read against the write cache).
Since AbstractJournal.closeForWrites(long)
does not interfere
with existing readers, care must be exercised if we are to release the
write cache atomically.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.