public abstract class KVDatabaseTest extends KVTestSupport
| Modifier and Type | Class and Description |
|---|---|
class |
KVDatabaseTest.Committer |
class |
KVDatabaseTest.RandomTask |
class |
KVDatabaseTest.Reader |
protected static interface |
KVDatabaseTest.Transactional<V> |
class |
KVDatabaseTest.Writer |
| Modifier and Type | Field and Description |
|---|---|
protected ExecutorService |
executor |
log, random, validator| Constructor and Description |
|---|
KVDatabaseTest() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowBothTransactionsToFail() |
protected KVTransaction |
createKVTransaction(KVDatabase kvdb) |
protected KVDatabase[][] |
getDBs() |
protected abstract KVDatabase |
getKVDatabase() |
protected int |
getNumTries() |
protected String |
mapRetryExceptionMessage(String message) |
void |
setup() |
void |
teardown() |
void |
testConflictingTransactions(KVDatabase store) |
void |
testKeyWatch(KVDatabase store) |
void |
testNonconflictingTransactions(KVDatabase store) |
void |
testParallelTransactions(KVDatabase store)
This test runs transactions in parallel and verifies there is no "leakage" between them.
|
void |
testParallelTransactions(KVDatabase[] stores) |
void |
testSequentialTransactions(KVDatabase store)
This test runs transactions sequentially and verifies that each transaction sees
the changes that were committed in the previous transaction.
|
void |
testSimpleStuff(KVDatabase store) |
protected <V> V |
tryNtimes(KVDatabase kvdb,
KVDatabaseTest.Transactional<V> transactional) |
protected void |
updateRetryStats(RetryTransactionException e) |
kv, s, showKV, showKV, stringView, stringViewb, ba, buildList, buildMap, buildSet, buildSortedMap, buildSortedSet, checkMap, checkSet, checkValid, createTempDirectory, deleteDirectoryHierarchy, getRandom, randomBytes, readResource, readResource, readResource, s, seedRandom, setUpValidator, showprotected ExecutorService executor
protected KVDatabase[][] getDBs()
protected abstract KVDatabase getKVDatabase()
public void testSimpleStuff(KVDatabase store) throws Exception
Exceptionpublic void testKeyWatch(KVDatabase store) throws Exception
Exceptionpublic void testConflictingTransactions(KVDatabase store) throws Exception
Exceptionprotected boolean allowBothTransactionsToFail()
public void testNonconflictingTransactions(KVDatabase store) throws Exception
Exceptionpublic void testParallelTransactions(KVDatabase store) throws Exception
store - underlying storeException - if an error occurspublic void testParallelTransactions(KVDatabase[] stores) throws Exception
Exceptionpublic void testSequentialTransactions(KVDatabase store) throws Exception
store - underlying storeException - if an error occursprotected <V> V tryNtimes(KVDatabase kvdb, KVDatabaseTest.Transactional<V> transactional)
protected int getNumTries()
protected KVTransaction createKVTransaction(KVDatabase kvdb)
protected void updateRetryStats(RetryTransactionException e)
Copyright © 2017. All rights reserved.