private Table newTable(boolean isPartitioned) {
    Table t = new Table("default", "table" + Integer.toString(nextInput++));
    if (isPartitioned) {
      FieldSchema fs = new FieldSchema();
      fs.setName("version");
      fs.setType("String");
      List<FieldSchema> partCols = new ArrayList<FieldSchema>(1);
      partCols.add(fs);
      t.setPartCols(partCols);
    }
    Map<String, String> tblProps = t.getParameters();
    if(tblProps == null) {
      tblProps = new HashMap<>();
    }
    tblProps.put(hive_metastoreConstants.TABLE_IS_TRANSACTIONAL, "true");
    t.setParameters(tblProps);
    return t;
  }
Same as testHeartbeater, but testing cleanup of replication txns (TxnType.REPL_CREATED)
Note: in TestDbTxnManager metastore.repl.txn.timeout is set to 30s for testing purposes.
ql/src/test/org/apache/hadoop/hive/ql/lockmgr/TestDbTxnManager.java