Example #1
0
 private BatchingNeoStores(FileSystemAbstraction fileSystem, PageCache pageCache, File databaseDirectory, RecordFormats recordFormats, Config neo4jConfig, Configuration importConfiguration, LogService logService, AdditionalInitialIds initialIds, bool externalPageCache, IoTracer ioTracer)
 {
     this._fileSystem              = fileSystem;
     this._recordFormats           = recordFormats;
     this._importConfiguration     = importConfiguration;
     this._initialIds              = initialIds;
     this._logProvider             = logService.InternalLogProvider;
     this._databaseLayout          = DatabaseLayout.of(databaseDirectory);
     this._temporaryDatabaseLayout = DatabaseLayout.of(_databaseLayout.file(TEMP_STORE_NAME), TEMP_STORE_NAME);
     this._neo4jConfig             = neo4jConfig;
     this._pageCache          = pageCache;
     this._ioTracer           = ioTracer;
     this._externalPageCache  = externalPageCache;
     this._idGeneratorFactory = new DefaultIdGeneratorFactory(fileSystem);
 }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void schemaAndLabelIndexesRemovedAfterSuccessfulMigration() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void SchemaAndLabelIndexesRemovedAfterSuccessfulMigration()
        {
            IndexDirectoryStructure directoryStructure = mock(typeof(IndexDirectoryStructure));
            File indexProviderRootDirectory            = _databaseLayout.file("just-some-directory");

            when(directoryStructure.RootDirectory()).thenReturn(indexProviderRootDirectory);
            when(_indexProvider.directoryStructure()).thenReturn(directoryStructure);
            when(_indexProvider.ProviderDescriptor).thenReturn(new IndexProviderDescriptor("key", "version"));

            _migrator.migrate(_databaseLayout, _migrationLayout, _progressReporter, StandardV2_3.STORE_VERSION, StandardV3_0.STORE_VERSION);

            _migrator.moveMigratedFiles(_migrationLayout, _databaseLayout, StandardV2_3.STORE_VERSION, StandardV3_0.STORE_VERSION);

            verify(_fs).deleteRecursively(indexProviderRootDirectory);
        }