private void verifySuccessulTxn(int expectedCompleteCompacts) throws MetaException {
    List<ShowCompactResponseElement> compacts =
        TxnUtils.getTxnStore(conf).showCompact(new ShowCompactRequest()).getCompacts();
    Assert.assertEquals("Completed compaction queue must contain one element",
        expectedCompleteCompacts, compacts.size());
    compacts.forEach(
        c -> Assert.assertEquals("Compaction state is not succeeded", "succeeded", c.getState()));
  }
Verify that the expected number of transactions have run, and their state is "succeeded".

@param expectedCompleteCompacts number of compactions already run
@throws MetaException
itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/txn/compactor/TestMmCompactorOnTez.java