use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.
the class DetectAllRelationshipInconsistenciesIT method getGraphDatabaseAPI.
private GraphDatabaseAPI getGraphDatabaseAPI() {
managementService = new TestDatabaseManagementServiceBuilder(directory.homePath()).setConfig(getConfig()).build();
GraphDatabaseService database = managementService.database(DEFAULT_DATABASE_NAME);
return (GraphDatabaseAPI) database;
}
use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.
the class SecurityProcedureQueryTypeTest method beforeAll.
@BeforeAll
static void beforeAll() {
databaseManagementService = new TestDatabaseManagementServiceBuilder(testDirectory.homePath()).setConfig(GraphDatabaseSettings.auth_enabled, true).build();
DependencyResolver dependencyResolver = ((GraphDatabaseFacade) databaseManagementService.database("system")).getDependencyResolver();
planner = dependencyResolver.resolveDependency(FabricPlanner.class);
}
use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.
the class CypherUpdateMapTest method setup.
@BeforeEach
void setup() {
managementService = new TestDatabaseManagementServiceBuilder().impermanent().build();
db = managementService.database(DEFAULT_DATABASE_NAME);
}
use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.
the class EagerResultIT method startRestartableDatabase.
private GraphDatabaseService startRestartableDatabase() {
Dependencies dependencies = new Dependencies();
dependencies.satisfyDependencies(testContextSupplier);
managementService = new TestDatabaseManagementServiceBuilder(storeDir).setExternalDependencies(dependencies).setConfig(GraphDatabaseInternalSettings.snapshot_query, true).build();
return managementService.database(DEFAULT_DATABASE_NAME);
}
use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.
the class PushToCloudCommandTest method createDbAndDump.
private void createDbAndDump() {
Config config = Config.newBuilder().set(GraphDatabaseSettings.neo4j_home, homeDir.toAbsolutePath()).set(default_database, DBNAME).build();
DatabaseLayout databaseLayout = DatabaseLayout.of(config);
Neo4jLayout neo4jLayout = databaseLayout.getNeo4jLayout();
DatabaseManagementService managementService = new TestDatabaseManagementServiceBuilder(neo4jLayout.homeDirectory()).setConfig(config).build();
managementService.database(databaseLayout.getDatabaseName());
managementService.shutdown();
dump = directory.file("some-archive.dump");
new RealDumpCreator(ctx).dumpDatabase(DBNAME, dump);
}
Aggregations