}
}
public void testCanReadFromArchivedLogFile() throws InvalidRecordLocationException, InterruptedException, IOException {
Packet data1 = createPacket("Hello World 1");
RecordLocationFacade location1 = (RecordLocationFacade)journal.write(data1, false);
RecordLocationFacade pos;
int counter = 0;
do {
Packet p = createPacket("<<<data>>>");
pos = (RecordLocationFacade)journal.write(p, false);
if (counter++ % 1000 == 0) {
journal.setMark(pos, false);
}
} while (pos.getLocation().getDataFileId() < 5);
// Now see if we can read that first packet.
Packet data;
data = journal.read(location1);
assertEquals(data1, data);
}