コード例 #1
0
 @Override
 public void test() throws Exception {
   FileUtils.createDirectories(getBaseDir());
   testStopWhileCommitting();
   testGetModifiedMaps();
   testKeyIterator();
   testMultiStatement();
   testTwoPhaseCommit();
   testSavepoint();
   testConcurrentTransactionsReadCommitted();
   testSingleConnection();
   testCompareWithPostgreSQL();
 }
コード例 #2
0
  @Override
  public void test() throws Exception {
    FileUtils.deleteRecursive(getBaseDir(), true);
    FileUtils.createDirectories(getBaseDir());
    FileUtils.deleteRecursive("memFS:", false);

    testConcurrentFree();
    testConcurrentStoreAndRemoveMap();
    testConcurrentStoreAndClose();
    testConcurrentOnlineBackup();
    testConcurrentMap();
    testConcurrentIterate();
    testConcurrentWrite();
    testConcurrentRead();
  }
コード例 #3
0
 private boolean openWriter() {
   if (printWriter == null) {
     try {
       FileUtils.createDirectories(FileUtils.getParent(fileName));
       if (FileUtils.exists(fileName) && !FileUtils.canWrite(fileName)) {
         // read only database: don't log error if the trace file
         // can't be opened
         return false;
       }
       fileWriter = IOUtils.getBufferedWriter(FileUtils.newOutputStream(fileName, true));
       printWriter = new PrintWriter(fileWriter, true);
     } catch (Exception e) {
       logWritingError(e);
       return false;
     }
   }
   return true;
 }