Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void skipLogFileWithoutHeader() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void SkipLogFileWithoutHeader()
        {
            FileSystemAbstraction fs = _fileSystemRule.get();
            LogFiles logFiles        = LogFilesBuilder.builder(_directory.databaseLayout(), fs).withTransactionIdStore(_transactionIdStore).withLogVersionRepository(_logVersionRepository).build();

            _life.add(logFiles);
            _life.start();

            // simulate new file without header presence
            _logVersionRepository.incrementAndGetVersion();
            fs.Create(logFiles.GetLogFileForVersion(_logVersionRepository.CurrentLogVersion)).close();
            _transactionIdStore.transactionCommitted(5L, 5L, 5L);

            PhysicalLogicalTransactionStore.LogVersionLocator versionLocator = new PhysicalLogicalTransactionStore.LogVersionLocator(4L);
            logFiles.Accept(versionLocator);

            LogPosition logPosition = versionLocator.LogPosition;

            assertEquals(1, logPosition.LogVersion);
        }
Exemplo n.º 2
0
 public override void PublishAsCommitted()
 {
     _committed = true;
     _transactionIdStore.transactionCommitted(_id, CHECKSUM, TIMESTAMP);
 }
Exemplo n.º 3
0
 public override void PublishAsCommitted()
 {
     _markedAsCommitted = true;
     _transactionIdStore.transactionCommitted(_transactionId, _transactionChecksum, _transactionCommitTimestamp);
 }