use of org.neo4j.kernel.impl.transaction.log.PhysicalLogFileInformation in project neo4j by neo4j.
the class PhysicalLogFileInformationTest method shouldReadFirstCommittedTransactionIdForAGivenVersionWhenCached.
@Test
public void shouldReadFirstCommittedTransactionIdForAGivenVersionWhenCached() throws Exception {
PhysicalLogFileInformation info = new PhysicalLogFileInformation(logFiles, logHeaderCache, transactionIdStore::getLastCommittedTransactionId, logVersionToTimestamp);
long expected = 5;
long version = 10L;
when(logHeaderCache.getLogHeader(version)).thenReturn(expected - 1);
long firstCommittedTxId = info.getFirstEntryId(version);
assertEquals(expected, firstCommittedTxId);
}
Aggregations