@Test
  public void withNotYetVisibleBase() throws Exception {

    String dbName = "default";
    String tableName = "camtc";
    Table t = newTable(dbName, tableName, false);

    addBaseFile(t, null, 20L, 20);
    burnThroughTransactions(dbName, tableName, 25);

    CompactionRequest rqst = new CompactionRequest(dbName, tableName, CompactionType.MAJOR);

    long compactTxn = compactInTxn(rqst);
    addBaseFile(t, null, 25L, 25, compactTxn);
    startCleaner();

    ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
    Assert.assertEquals(1, rsp.getCompactsSize());
    Assert.assertEquals(TxnStore.SUCCEEDED_RESPONSE, rsp.getCompacts().get(0).getState());
  }
Tests for the compactor Cleaner thread
ql/src/test/org/apache/hadoop/hive/ql/txn/compactor/TestCleaner.java