@Test
  public void testFullACIDAbortWithCompactionNoCleanup() throws Exception {
    // 1. Insert some rows into acid table
    runStatementOnDriver("insert into " + Table.ACIDTBL + "(a,b) values(1,2)");
    runStatementOnDriver("insert into " + Table.ACIDTBL + "(a,b) values(3,4)");
    // There should be 2 delta directories
    int [][] resultData1 =  new int[][] {{1,2}, {3,4}};
    verifyDeltaDirAndResult(2, Table.ACIDTBL.toString(), "", resultData1);

    // 2. abort one txns
    hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_TEST_MODE_ROLLBACK_TXN, true);
    runStatementOnDriver("insert into " + Table.ACIDTBL + "(a,b) values(5,6)");
    hiveConf.setBoolVar(HiveConf.ConfVars.HIVE_TEST_MODE_ROLLBACK_TXN, false);
    verifyDeltaDirAndResult(3, Table.ACIDTBL.toString(), "", resultData1);

    // 3. Perform a MAJOR compaction.
    runStatementOnDriver("alter table "+ Table.ACIDTBL + " compact 'MAJOR'");
    runWorker(hiveConf);
    verifyDeltaDirAndResult(3, Table.ACIDTBL.toString(), "", resultData1);
    verifyBaseDir(1, Table.ACIDTBL.toString(), "");

    // Verify query result
    List<String> rs = runStatementOnDriver("select a,b from " + Table.ACIDTBL + " order by a");
    Assert.assertEquals(stringifyValues(resultData1), rs);
  }
Test cleaner for TXN_TO_WRITE_ID table.
@throws Exception
ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java