@Test
  public void testShowLocksAgentInfo() throws Exception {
    driver.run("create table if not exists XYZ (a int, b int)");
    driver.compileAndRespond("select a from XYZ where b = 8", true);
    txnMgr.acquireLocks(driver.getPlan(), ctx, "XYZ");
    List<ShowLocksResponseElement> locks = getLocks(txnMgr);
    Assert.assertEquals("Unexpected lock count", 1, locks.size());
    TestTxnDbUtil.checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "XYZ", null, locks);
    Assert.assertEquals("Wrong AgentInfo", driver.getPlan().getQueryId(), locks.get(0).getAgentInfo());
  }
Concurrent delete/delete of same partition - should NOT pass
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager2.java