use of org.neo4j.kernel.database.DefaultDatabaseResolver in project neo4j by neo4j.
the class SessionExtension method beforeEach.
@Override
public void beforeEach(ExtensionContext extensionContext) {
managementService = builderFactory.get().impermanent().setConfig(GraphDatabaseSettings.auth_enabled, authEnabled).build();
gdb = (GraphDatabaseAPI) managementService.database(GraphDatabaseSettings.DEFAULT_DATABASE_NAME);
DependencyResolver resolver = gdb.getDependencyResolver();
Authentication authentication = authentication(resolver.resolveDependency(AuthManager.class));
Config config = resolver.resolveDependency(Config.class);
SystemNanoClock clock = Clocks.nanoClock();
DefaultDatabaseResolver defaultDatabaseResolver = new CommunityDefaultDatabaseResolver(config, () -> managementService.database(GraphDatabaseSettings.SYSTEM_DATABASE_NAME));
BoltGraphDatabaseManagementServiceSPI databaseManagementService = new BoltKernelDatabaseManagementServiceProvider(managementService, new Monitors(), clock, ofSeconds(30));
boltFactory = new BoltStateMachineFactoryImpl(databaseManagementService, authentication, clock, config, NullLogService.getInstance(), defaultDatabaseResolver);
}
Aggregations