Assert.assertEquals(0, records.size());
Assert.assertEquals(0, transactions.size());
for (int i = 0; i < 10; i++)
{
journalImpl.appendAddRecordTransactional(1, i, (byte)1, new SimpleEncoding(1, (byte)1));
journalImpl.forceMoveNextFile();
}
journalImpl.appendCommitRecord(1l, false);
journalImpl.debugWait();
Assert.assertEquals(12, factory.listFiles("tt").size());
setupAndLoadJournal(JOURNAL_SIZE, 100);
Assert.assertEquals(10, records.size());
Assert.assertEquals(0, transactions.size());
journalImpl.checkReclaimStatus();
Assert.assertEquals(10, journalImpl.getDataFilesCount());
Assert.assertEquals(12, factory.listFiles("tt").size());
for (int i = 0; i < 10; i++)
{
journalImpl.appendDeleteRecordTransactional(2l, i);
journalImpl.forceMoveNextFile();
}
journalImpl.appendCommitRecord(2l, false);
journalImpl.appendAddRecord(100, (byte)1, new SimpleEncoding(5, (byte)1), false);
journalImpl.forceMoveNextFile();
journalImpl.appendAddRecord(101, (byte)1, new SimpleEncoding(5, (byte)1), false);
journalImpl.checkReclaimStatus();
Assert.assertEquals(1, journalImpl.getDataFilesCount());