private void testLoadData(boolean sharedWrite) throws Exception {
    dropTable(new String[] {"T2"});
    conf.setBoolVar(HiveConf.ConfVars.TXN_WRITE_X_LOCK, !sharedWrite);
    driver.run("create table T2(a int) stored as ORC TBLPROPERTIES ('transactional'='true')");
    driver.run("insert into T2 values(1)");
    String exportLoc = exportFolder.newFolder("1").toString();
    driver.run("export table T2 to '" + exportLoc + "/2'");
    driver.compileAndRespond("load data inpath '" + exportLoc + "/2/data' overwrite into table T2");
    txnMgr.acquireLocks(driver.getPlan(), ctx, "Fifer");
    List<ShowLocksResponseElement> locks = getLocks();
    Assert.assertEquals("Unexpected lock count", 1, locks.size());
    TestTxnDbUtil.checkLock((sharedWrite ? LockType.EXCL_WRITE : LockType.EXCLUSIVE),
        LockState.ACQUIRED, "default", "T2", null, locks);
    txnMgr.commitTxn();
  }
T7 is a table with 2 partitions
1. run select from T7
2. run drop partition from T7
concurrently with 1 starting first so that 2 blocks
3. start another concurrent select on T7 - it should block behind waiting X (from drop) - LM should be fair
4. finish #1 so that drop unblocks
5. rollback the drop to release its X lock
6. # should unblock
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java