@Test public void olderLogFileContainingAStartAndNewerFileContainingACheckPointPointingToALaterPositionThanStart() { // given PositionEntry position = position(); setupLogFiles( logFile( start(), commit( 3 ), position ), logFile( checkPoint( position ) ) ); // when LogTailInformation logTailInformation = tailScanner.getTailInformation(); // then assertLatestCheckPoint( true, false, NO_TRANSACTION_ID, endLogVersion, logTailInformation ); }
@Test public void twoLogFilesCheckPointTargetsPrevious() { // given long txId = 6; PositionEntry position = position(); setupLogFiles( logFile( start(), commit( txId - 1 ), position ), logFile( start(), commit( txId ) ), logFile( checkPoint( position ) ) ); // when LogTailInformation logTailInformation = tailScanner.getTailInformation(); // then assertLatestCheckPoint( true, true, txId, endLogVersion, logTailInformation ); }