use of org.apache.jackrabbit.oak.segment.spi.persistence.JournalFileReader in project jackrabbit-oak by apache.
the class AzureJournalFileTest method testSplitJournalFiles.
@Test
public void testSplitJournalFiles() throws IOException {
assertFalse(journal.exists());
JournalFileWriter writer = journal.openJournalWriter();
for (int i = 0; i < 100; i++) {
writer.writeLine("line " + i);
}
assertTrue(journal.exists());
writer = journal.openJournalWriter();
for (int i = 100; i < 200; i++) {
writer.writeLine("line " + i);
}
JournalFileReader reader = journal.openJournalReader();
for (int i = 199; i >= 0; i--) {
assertEquals("line " + i, reader.readLine());
}
}
Aggregations