expectedSizes.add(recordLength + JournalImpl.SIZE_ADD_RECORD + 1);
journal.forceMoveNextFile();
}
JournalFile files[] = journal.getDataFiles();
stopJournal();
createJournal();
startJournal();
loadAndCheck();
journal.forceMoveNextFile();
JournalFile files2[] = journal.getDataFiles();
Assert.assertEquals(files.length, files2.length);
for (int i = 0; i < files.length; i++)
{
Assert.assertEquals(expectedSizes.get(i).intValue(), files[i].getLiveSize());
Assert.assertEquals(expectedSizes.get(i).intValue(), files2[i].getLiveSize());
}
for (long id : listToDelete)
{
delete(id);
}
journal.forceMoveNextFile();
JournalFile files3[] = journal.getDataFiles();
for (JournalFile file : files3)
{
Assert.assertEquals(0, file.getLiveSize());
}