@Test
  public void testMultiInsert() throws Exception {
    dropTable(new String[] {"TAB1", "tab1", "tab_not_acid"});
    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_acid (a int, b int, p string)");
    driver.run("insert into tab_not_acid values(1,1,'one'),(2,2,'two')");
    driver.run("insert into tab1 partition(p) values(3,3,'one'),(4,4,'two')"); //txinid:2
    //writing both acid and non-acid resources in the same txn
    //tab1 write is a dynamic partition insert
    driver.run("from tab_not_acid insert into tab1 partition(p)(a,b,p) select a,b,p " +
        "insert into tab_not_acid(a,b) select a,b where p='two'"); //txnid:3
    Assert.assertEquals(TestTxnDbUtil.queryToString(conf, "select * from \"COMPLETED_TXN_COMPONENTS\""),
        4, 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\""),
        2, TestTxnDbUtil.countQueryAgent(conf, "select count(*) from \"COMPLETED_TXN_COMPONENTS\" where \"CTC_TXNID\"=3"));
    Assert.assertEquals(TestTxnDbUtil.queryToString(conf, "select * from \"COMPLETED_TXN_COMPONENTS\""),
        2, TestTxnDbUtil.countQueryAgent(conf,
        "select count(*) from \"COMPLETED_TXN_COMPONENTS\" where \"CTC_TXNID\"=3 and \"CTC_TABLE\"='tab1'"));
  }
Concurrent delete/delete of same partition - should NOT pass
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java