protected FileSystemAbstraction createFileSystemAbstraction() { return new DefaultFileSystemAbstraction(); }
public ReadOnlyIdGeneratorFactory() { this.fileSystemAbstraction = new DefaultFileSystemAbstraction(); }
private static DefaultFileSystemAbstraction createFileSystem() { return new DefaultFileSystemAbstraction(); }
@Override protected FileSystemAbstraction buildFileSystemAbstraction() { return new DefaultFileSystemAbstraction(); }
@Override protected DefaultFileSystemAbstraction createField( ExtensionContext extensionContext ) { return new DefaultFileSystemAbstraction(); } }
public DefaultFileSystemRule() { super( new DefaultFileSystemAbstraction() ); } }
public AdversarialFileSystemAbstraction( Adversary adversary ) { this( adversary, new DefaultFileSystemAbstraction() ); }
public static TestDirectory testDirectory( Class<?> owningTest ) { return new TestDirectory( new DefaultFileSystemAbstraction(), owningTest ); }
public static TestDirectory testDirectory() { return new TestDirectory( new DefaultFileSystemAbstraction() ); }
private LuceneDataSource getLuceneDataSource( Config config, OperationalMode operationalMode ) { return new LuceneDataSource( directory.databaseLayout(), config, indexStore, new DefaultFileSystemAbstraction(), operationalMode ); } }
@Before public void createStore() { file = new File( "target/test-data/index-provider-store" ); fileSystem = new DefaultFileSystemAbstraction(); file.mkdirs(); fileSystem.deleteFile( file ); }
@BeforeEach void setUp() throws IOException { file = new File( "file" ).getCanonicalFile(); ephemeralFileSystem = new EphemeralFileSystemAbstraction(); fileSystem = new DefaultFileSystemAbstraction(); }
@Before public void before() { fs = new DefaultFileSystemAbstraction(); defaultThreshold = parseInt( GraphDatabaseSettings.dense_node_threshold.getDefaultValue() ); }
private static void runConsistencyCheckToolWith( ConsistencyCheckService consistencyCheckService, PrintStream printStream, String... args ) throws ToolFailureException, IOException { try ( FileSystemAbstraction fileSystemAbstraction = new DefaultFileSystemAbstraction() ) { new ConsistencyCheckTool( consistencyCheckService, fileSystemAbstraction, printStream, printStream ).run( args ); } } }
private static void assertCanLockStore( Path databaseDirectory ) throws IOException { try ( FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction(); StoreLocker storeLocker = new StoreLocker( fileSystem, DatabaseLayout.of( databaseDirectory.toFile() ).getStoreLayout() ) ) { storeLocker.checkLock(); } }
private ConsistencyCheckService.Result fullConsistencyCheck() throws ConsistencyCheckIncompleteException, IOException { try ( FileSystemAbstraction fsa = new DefaultFileSystemAbstraction() ) { ConsistencyCheckService service = new ConsistencyCheckService(); Config config = Config.defaults(); return service.runFullConsistencyCheck( db.databaseLayout(), config, NONE, log, fsa, true ); } } }
@Test void shouldRespectTheStoreLock() throws IOException { Path databaseDirectory = homeDir.resolve( "data/databases/foo.db" ); Files.createDirectories( databaseDirectory ); StoreLayout storeLayout = DatabaseLayout.of( databaseDirectory.toFile() ).getStoreLayout(); try ( FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction(); StoreLocker locker = new StoreLocker( fileSystem, storeLayout ) ) { locker.checkLock(); CommandFailed commandFailed = assertThrows( CommandFailed.class, () -> execute( "foo.db", "--force" ) ); assertEquals( "the database is in use -- stop Neo4j and try again", commandFailed.getMessage() ); } }
static Fixture prepareDirectoryAndPageCache( Class<?> testClass ) throws IOException { DefaultFileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction(); TestDirectory testDirectory = TestDirectory.testDirectory( testClass, fileSystem ); File dir = testDirectory.prepareDirectoryForTest( "test" ); ThreadPoolJobScheduler scheduler = new ThreadPoolJobScheduler(); PageCache pageCache = StandalonePageCacheFactory.createPageCache( fileSystem, scheduler ); return new Fixture( pageCache, fileSystem, dir, scheduler ); }
private ConsistencyCheckService.Result fullConsistencyCheck() throws ConsistencyCheckIncompleteException, IOException { try ( FileSystemAbstraction fsa = new DefaultFileSystemAbstraction() ) { ConsistencyCheckService service = new ConsistencyCheckService(); Config config = Config.defaults(); return service.runFullConsistencyCheck( db.databaseLayout(), config, NONE, log, fsa, true, new ConsistencyFlags( config ) ); } } }
@Test void shouldRespectTheStoreLock() throws Exception { Path databaseDirectory = homeDir.resolve( "data/databases/foo.db" ); StoreLayout storeLayout = DatabaseLayout.of( databaseDirectory.toFile() ).getStoreLayout(); try ( FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction(); StoreLocker storeLocker = new StoreLocker( fileSystem, storeLayout ) ) { storeLocker.checkLock(); CommandFailed commandFailed = assertThrows( CommandFailed.class, () -> execute( "foo.db" ) ); assertEquals( "the database is in use -- stop Neo4j and try again", commandFailed.getMessage() ); } }