@Before
  public void setUp() throws Exception {
    // set the connection pool size to 1
    MetastoreConf.setLongVar(conf, MetastoreConf.ConfVars.CONNECTION_POOLING_MAX_CONNECTIONS, 1);
    // set the connection timeout to the minimum accepted value
    String CONNECTION_TIMEOUT_PROPERTY = "hikaricp.connectionTimeout";
    conf.setLong(CONNECTION_TIMEOUT_PROPERTY, 250L);
    txnHandler = TxnUtils.getTxnStore(conf);
  }
Tests to ensure function works even with connection pool size is 1
ql/src/test/org/apache/hadoop/hive/metastore/txn/TestTxnHandlerWithOneConnection.java