Class KVDatabaseTest


public abstract class KVDatabaseTest extends KVTestSupport
  • Field Details

  • Constructor Details

    • KVDatabaseTest

      public KVDatabaseTest()
  • Method Details

    • setupExecutorAndDatabases

      @BeforeClass(dependsOnGroups="configure") public void setupExecutorAndDatabases() throws Exception
      Throws:
      Exception
    • teardownExecutorAndDatabases

      @AfterClass public void teardownExecutorAndDatabases() throws Exception
      Throws:
      Exception
    • getDBs

      @DataProvider(name="kvdbs") protected KVDatabase[][] getDBs()
    • getKVDatabase

      protected abstract KVDatabase getKVDatabase()
    • getNonconflictingTransactionCount

      protected int getNonconflictingTransactionCount()
    • getParallelTransactionLoopCount

      protected int getParallelTransactionLoopCount()
    • getParallelTransactionTaskCount

      protected int getParallelTransactionTaskCount()
    • getSequentialTransactionLoopCount

      protected int getSequentialTransactionLoopCount()
    • getRandomTaskMaxIterations

      protected int getRandomTaskMaxIterations()
    • allowsWriteSkewAnomaly

      protected boolean allowsWriteSkewAnomaly()
    • supportsReadOnlyAfterDataAccess

      protected boolean supportsReadOnlyAfterDataAccess()
    • allowBothTransactionsToFail

      protected boolean allowBothTransactionsToFail()
    • transactionsAreThreadSafe

      protected boolean transactionsAreThreadSafe()
    • supportsMultipleWriteTransactions

      protected boolean supportsMultipleWriteTransactions()
    • testSimpleStuff

      public void testSimpleStuff(KVDatabase store) throws Exception
      Throws:
      Exception
    • testReadOnly

      public void testReadOnly(KVDatabase store) throws Exception
      Throws:
      Exception
    • testSortOrder

      public void testSortOrder(KVDatabase store) throws Exception
      Throws:
      Exception
    • testKeyWatch

      public void testKeyWatch(KVDatabase store) throws Exception
      Throws:
      Exception
    • testReadWriteConflict

      public void testReadWriteConflict(KVDatabase store) throws Exception
      Throws:
      Exception
    • testWriteSkewAnomaly

      public void testWriteSkewAnomaly(KVDatabase store) throws Exception
      Throws:
      Exception
    • testConflictingTransactions

      protected void testConflictingTransactions(KVDatabase store, String name, io.permazen.kv.test.KVDatabaseTest.Conflictor conflictor, KVPair expected1, KVPair expected2) throws Exception
      Throws:
      Exception
    • testNonconflictingTransactions

      public void testNonconflictingTransactions(KVDatabase store) throws Exception
      Throws:
      Exception
    • testParallelTransactions

      public void testParallelTransactions(KVDatabase store) throws Exception
      This test runs transactions in parallel and verifies there is no "leakage" between them. Database must be configured for linearizable isolation.
      Parameters:
      store - underlying store
      Throws:
      Exception - if an error occurs
    • testParallelTransactions

      public void testParallelTransactions(KVDatabase[] stores) throws Exception
      Throws:
      Exception
    • testSequentialTransactions

      public void testSequentialTransactions(KVDatabase store) throws Exception
      This test runs transactions sequentially and verifies that each transaction sees the changes that were committed in the previous transaction.
      Parameters:
      store - underlying store
      Throws:
      Exception - if an error occurs
    • testMultipleThreadsTransaction

      public void testMultipleThreadsTransaction(KVDatabase store) throws Exception
      This test has multiple threads banging away on a single transaction to verify that the transaction is thread safe.
      Parameters:
      store - underlying store
      Throws:
      Exception - if an error occurs
    • testApplyMutations

      public void testApplyMutations(KVDatabase store) throws Exception
      Test KVStore.apply().
      Parameters:
      store - database
      Throws:
      Exception - if an error occurs