use of org.neo4j.io.fs.UncloseableDelegatingFileSystemAbstraction in project neo4j by neo4j.
the class TestReadOnlyNeo4j method createSomeData.
private DbRepresentation createSomeData() {
RelationshipType type = withName("KNOWS");
DatabaseManagementService managementService = new TestDatabaseManagementServiceBuilder(testDirectory.homePath()).setFileSystem(new UncloseableDelegatingFileSystemAbstraction(fs)).impermanent().build();
GraphDatabaseService db = managementService.database(DEFAULT_DATABASE_NAME);
try (Transaction tx = db.beginTx()) {
Node prevNode = tx.createNode();
for (int i = 0; i < 100; i++) {
Node node = tx.createNode();
Relationship rel = prevNode.createRelationshipTo(node, type);
node.setProperty("someKey" + i % 10, i % 15);
rel.setProperty("since", System.currentTimeMillis());
}
tx.commit();
}
DbRepresentation result = DbRepresentation.of(db);
managementService.shutdown();
return result;
}
use of org.neo4j.io.fs.UncloseableDelegatingFileSystemAbstraction in project neo4j by neo4j.
the class IndexRestartIT method before.
@BeforeEach
void before() {
factory = new TestDatabaseManagementServiceBuilder();
factory.setFileSystem(new UncloseableDelegatingFileSystemAbstraction(fs));
factory.setExtensions(Arrays.asList(singleInstanceIndexProviderFactory("test", provider), new TokenIndexProviderFactory()));
}
use of org.neo4j.io.fs.UncloseableDelegatingFileSystemAbstraction in project neo4j by neo4j.
the class NeoStoresTest method createShutdownTestDatabase.
private static void createShutdownTestDatabase(FileSystemAbstraction fileSystem, Path storeDir) {
DatabaseManagementService managementService = new TestDatabaseManagementServiceBuilder(storeDir).setFileSystem(new UncloseableDelegatingFileSystemAbstraction(fileSystem)).impermanent().build();
managementService.shutdown();
}
use of org.neo4j.io.fs.UncloseableDelegatingFileSystemAbstraction in project neo4j by neo4j.
the class RunOutOfDiskSpaceIT method setUp.
@BeforeEach
void setUp() {
limitedFs = new LimitedFilesystemAbstraction(new UncloseableDelegatingFileSystemAbstraction(fileSystem));
managementService = new TestDatabaseManagementServiceBuilder(databaseLayout).setFileSystem(limitedFs).build();
database = (GraphDatabaseAPI) managementService.database(DEFAULT_DATABASE_NAME);
}
Aggregations