@Test
  public void basicOpenTxnsNoDirtyRead() throws Exception {
    driver.run(("drop table if exists gap"));
    driver.run("create table gap (a int, b int) " + "stored as orc TBLPROPERTIES ('transactional'='true')");
    // Create one TXN to read and do not run it
    driver.compileAndRespond("select * from gap");
    long first = txnMgr.getCurrentTxnId();

    DbTxnManager txnMgr2 = (DbTxnManager) TxnManagerFactory.getTxnManagerFactory().getTxnManager(conf);
    swapTxnManager(txnMgr2);
    driver2.compileAndRespond("insert into gap values(1,2)");
    long second = txnMgr2.getCurrentTxnId();
    Assert.assertTrue("Sequence number goes onward", second > first);
    driver2.run();

    // Now we run our read query it should not see the write results of the insert
    swapTxnManager(txnMgr);
    driver.run();

    FetchTask fetchTask = driver.getFetchTask();
    List res = new ArrayList();
    fetchTask.fetch(res);
    Assert.assertEquals("No dirty read", 0, res.size());

  }
Tests to check the ACID properties and isolation level requirements.
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManagerIsolationProperties.java