public void testTransactionCleanup() throws Exception {
conf.setInt(TxConstants.Manager.CFG_TX_CLEANUP_INTERVAL, 3);
conf.setInt(TxConstants.Manager.CFG_TX_TIMEOUT, 2);
// using a new tx manager that cleans up
TransactionManager txm = new TransactionManager
(conf, new InMemoryTransactionStateStorage(), new TxMetricsCollector());
txm.startAndWait();
try {
Assert.assertEquals(0, txm.getInvalidSize());
Assert.assertEquals(0, txm.getCommittedSize());
// start a transaction and leave it open