use of org.junit.jupiter.params.provider.MethodSource in project neo4j by neo4j.
the class AbstractLogTailScannerTest method twoLogFilesSecondIsCorruptedBeforeCommit.
@ParameterizedTest
@MethodSource("params")
void twoLogFilesSecondIsCorruptedBeforeCommit(int startLogVersion, int endLogVersion) throws IOException {
setupLogFiles(endLogVersion, logFile(checkPoint()), logFile(start(), commit(2)));
Path highestLogFile = logFiles.getLogFile().getHighestLogFile();
fs.truncate(highestLogFile, fs.getFileSize(highestLogFile) - 3);
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(true, true, NO_TRANSACTION_ID, false, logTailInformation);
}
use of org.junit.jupiter.params.provider.MethodSource in project neo4j by neo4j.
the class AbstractLogTailScannerTest method twoLogFilesNoCheckPoints.
@ParameterizedTest
@MethodSource("params")
void twoLogFilesNoCheckPoints(int startLogVersion, int endLogVersion) {
// given
setupLogFiles(endLogVersion, logFile(), logFile());
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(false, false, NO_TRANSACTION_ID, false, logTailInformation);
}
use of org.junit.jupiter.params.provider.MethodSource in project neo4j by neo4j.
the class AbstractLogTailScannerTest method latestLogFileContainingMultipleCheckPointsOneStartAfterBoth.
@ParameterizedTest
@MethodSource("params")
void latestLogFileContainingMultipleCheckPointsOneStartAfterBoth(int startLogVersion, int endLogVersion) {
// given
long txId = 11;
setupLogFiles(endLogVersion, logFile(checkPoint(), checkPoint(), start(), commit(txId)));
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(true, true, txId, false, logTailInformation);
}
use of org.junit.jupiter.params.provider.MethodSource in project neo4j by neo4j.
the class AbstractLogTailScannerTest method twoLogFilesNoCheckPointsTwoCommits.
@ParameterizedTest
@MethodSource("params")
void twoLogFilesNoCheckPointsTwoCommits(int startLogVersion, int endLogVersion) {
// given
long txId = 21;
setupLogFiles(endLogVersion, logFile(), logFile(start(), commit(txId), start(), commit(txId + 1)));
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(false, true, txId, false, logTailInformation);
}
use of org.junit.jupiter.params.provider.MethodSource in project neo4j by neo4j.
the class AbstractLogTailScannerTest method olderLogFileContainingAStartAndNewerFileContainingACheckPointPointingToALaterPositionThanStart.
@ParameterizedTest
@MethodSource("params")
void olderLogFileContainingAStartAndNewerFileContainingACheckPointPointingToALaterPositionThanStart(int startLogVersion, int endLogVersion) {
// given
PositionEntry position = position();
setupLogFiles(endLogVersion, logFile(start(), commit(3), position), logFile(checkPoint(position)));
// when
LogTailInformation logTailInformation = logFiles.getTailInformation();
// then
assertLatestCheckPoint(true, false, NO_TRANSACTION_ID, false, logTailInformation);
}
Aggregations