@Test
  public void testCompletedTxnComponents() throws Exception {
    dropTable(new String[] {"TAB1", "tab_not_acid2"});
    driver.run("create table if not exists tab1 (a int, b int) partitioned by (p string) " +
        "clustered by (a) into 2  buckets stored as orc TBLPROPERTIES ('transactional'='true')");
    driver.run("create table if not exists tab_not_acid2 (a int, b int)");
    driver.run("insert into tab_not_acid2 values(1,1),(2,2)");
    //writing both acid and non-acid resources in the same txn
    driver.run("from tab_not_acid2 insert into tab1 partition(p='two')(a,b) select a,b " +
        "insert into tab_not_acid2(a,b) select a,b "); //txnid:1
    Assert.assertEquals(TestTxnDbUtil.queryToString(conf, "select * from \"COMPLETED_TXN_COMPONENTS\""),
        1, TestTxnDbUtil.countQueryAgent(conf, "select count(*) from \"COMPLETED_TXN_COMPONENTS\""));
    //only expect transactional components to be in COMPLETED_TXN_COMPONENTS
    Assert.assertEquals(TestTxnDbUtil.queryToString(conf, "select * from \"COMPLETED_TXN_COMPONENTS\""),
        1, TestTxnDbUtil.countQueryAgent(conf,
        "select count(*) from \"COMPLETED_TXN_COMPONENTS\" where \"CTC_TXNID\"=2 and \"CTC_TABLE\"='tab1'"));
  }
Concurrent delete/delete of same partition - should NOT pass
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java