예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void logFileInStoreDirectoryDoesNotExist(java.io.File storeDir, org.neo4j.graphdb.DependencyResolver dependencyResolver) throws java.io.IOException
        private static void LogFileInStoreDirectoryDoesNotExist(File storeDir, DependencyResolver dependencyResolver)
        {
            FileSystemAbstraction fileSystem = dependencyResolver.ResolveDependency(typeof(FileSystemAbstraction));
            LogFiles storeLogFiles           = logFilesBasedOnlyBuilder(storeDir, fileSystem).build();

            assertFalse(storeLogFiles.VersionExists(0));
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void verifyTransactionLogs(java.io.File txDirectory, java.io.File storeDir) throws java.io.IOException
        private void VerifyTransactionLogs(File txDirectory, File storeDir)
        {
            FileSystemAbstraction fileSystem = FileSystemRule.get();
            LogFiles storeDirLogs            = LogFilesBuilder.logFilesBasedOnlyBuilder(storeDir, fileSystem).build();

            assertFalse(storeDirLogs.VersionExists(0));

            LogFiles txDirectoryLogs = LogFilesBuilder.logFilesBasedOnlyBuilder(txDirectory, fileSystem).build();

            assertTrue(txDirectoryLogs.VersionExists(0));
            using (PhysicalLogVersionedStoreChannel physicalLogVersionedStoreChannel = txDirectoryLogs.OpenForVersion(0))
            {
                assertThat(physicalLogVersionedStoreChannel.Size(), greaterThan(0L));
            }
        }
예제 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void backupDatabaseTransactionLogsStoredWithDatabase() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void BackupDatabaseTransactionLogsStoredWithDatabase()
        {
            int backupPort = PortAuthority.allocatePort();

            StartDb(backupPort);
            string ip   = ":" + backupPort;
            string name = "backupWithTxLogs" + RecordFormat;

            assertEquals(0, RunBackupTool(_testDirectory.absolutePath(), "--from", ip, "--cc-report-dir=" + _backupDir, "--backup-dir=" + _backupDir, "--name=" + name));
            _db.shutdown();

            using (DefaultFileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction())
            {
                LogFiles logFiles = LogFilesBuilder.logFilesBasedOnlyBuilder(new File(_backupDir, name), fileSystem).build();
                assertTrue(logFiles.VersionExists(0));
                assertThat(logFiles.GetLogFileForVersion(0).length(), greaterThan(50L));
            }
        }