use of org.neo4j.kernel.recovery.LatestCheckPointFinder.LatestCheckPoint in project neo4j by neo4j.
the class LatestCheckPointFinderTest method latestLogFileContainingACheckPointAndAStartBefore.
@Test
public void latestLogFileContainingACheckPointAndAStartBefore() throws Throwable {
// given
setupLogFiles(logFile(start(), checkPoint()));
// when
LatestCheckPoint latestCheckPoint = finder.find(endLogVersion);
// then
assertLatestCheckPoint(true, false, NO_TRANSACTION_ID, endLogVersion, latestCheckPoint);
}
use of org.neo4j.kernel.recovery.LatestCheckPointFinder.LatestCheckPoint in project neo4j by neo4j.
the class LatestCheckPointFinderTest method latestLogFileContainingMultipleCheckPointsOneStartAfterBoth.
@Test
public void latestLogFileContainingMultipleCheckPointsOneStartAfterBoth() throws Throwable {
// given
long txId = 11;
setupLogFiles(logFile(checkPoint(), checkPoint(), start(), commit(txId)));
// when
LatestCheckPoint latestCheckPoint = finder.find(endLogVersion);
// then
assertLatestCheckPoint(true, true, txId, endLogVersion, latestCheckPoint);
}
use of org.neo4j.kernel.recovery.LatestCheckPointFinder.LatestCheckPoint in project neo4j by neo4j.
the class LatestCheckPointFinderTest method latestLogEmptyStartEntryBeforeAndAfterCheckPointInTheLastButOneLog.
@Test
public void latestLogEmptyStartEntryBeforeAndAfterCheckPointInTheLastButOneLog() throws Throwable {
// given
long txId = 432;
setupLogFiles(logFile(start(), checkPoint(), start(), commit(txId)), logFile());
// when
LatestCheckPoint latestCheckPoint = finder.find(endLogVersion);
// then
assertLatestCheckPoint(true, true, txId, startLogVersion, latestCheckPoint);
}
use of org.neo4j.kernel.recovery.LatestCheckPointFinder.LatestCheckPoint in project neo4j by neo4j.
the class LatestCheckPointFinderTest method latestLogFileContainingACheckPointAndAStartWithoutCommitAfter.
@Test
public void latestLogFileContainingACheckPointAndAStartWithoutCommitAfter() throws Throwable {
// given
StartEntry start = start();
setupLogFiles(logFile(start, checkPoint(start)));
// when
LatestCheckPoint latestCheckPoint = finder.find(endLogVersion);
// then
assertLatestCheckPoint(true, true, NO_TRANSACTION_ID, endLogVersion, latestCheckPoint);
}
use of org.neo4j.kernel.recovery.LatestCheckPointFinder.LatestCheckPoint in project neo4j by neo4j.
the class LatestCheckPointFinderTest method twoLogFilesNoCheckPointsOneStartWithoutCommit.
@Test
public void twoLogFilesNoCheckPointsOneStartWithoutCommit() throws Throwable {
// given
setupLogFiles(logFile(), logFile(start()));
// when
LatestCheckPoint latestCheckPoint = finder.find(endLogVersion);
// then
assertLatestCheckPoint(false, true, NO_TRANSACTION_ID, startLogVersion, latestCheckPoint);
}
Aggregations