Search in sources :

Example 26 with TestDatabaseManagementServiceBuilder

use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.

the class RebuildCountsTest method restart.

private void restart(FileSystemAbstraction fs) {
    if (db != null) {
        managementService.shutdown();
    }
    managementService = new TestDatabaseManagementServiceBuilder(databaseLayout).setUserLogProvider(userLogProvider).setInternalLogProvider(internalLogProvider).setFileSystem(new UncloseableDelegatingFileSystemAbstraction(fs)).impermanent().setConfig(index_background_sampling_enabled, false).build();
    db = managementService.database(DEFAULT_DATABASE_NAME);
}
Also used : TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder) UncloseableDelegatingFileSystemAbstraction(org.neo4j.io.fs.UncloseableDelegatingFileSystemAbstraction)

Example 27 with TestDatabaseManagementServiceBuilder

use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.

the class BatchInsertTest method instantiateGraphDatabaseService.

private GraphDatabaseAPI instantiateGraphDatabaseService(int denseNodeThreshold) {
    TestDatabaseManagementServiceBuilder factory = new TestDatabaseManagementServiceBuilder(databaseLayout);
    factory.setFileSystem(fs);
    managementService = factory.impermanent().setConfig(configuration(denseNodeThreshold)).build();
    return (GraphDatabaseAPI) managementService.database(DEFAULT_DATABASE_NAME);
}
Also used : TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI)

Example 28 with TestDatabaseManagementServiceBuilder

use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.

the class BoltThrottleMaxDurationIT method getTestGraphDatabaseFactory.

protected TestDatabaseManagementServiceBuilder getTestGraphDatabaseFactory() {
    TestDatabaseManagementServiceBuilder factory = new TestDatabaseManagementServiceBuilder();
    logProvider = new AssertableLogProvider();
    factory.setInternalLogProvider(logProvider);
    return factory;
}
Also used : TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder) AssertableLogProvider(org.neo4j.logging.AssertableLogProvider)

Example 29 with TestDatabaseManagementServiceBuilder

use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.

the class BatchInsertTokenIndexesTest method instantiateGraphDatabaseService.

private GraphDatabaseAPI instantiateGraphDatabaseService() {
    TestDatabaseManagementServiceBuilder factory = new TestDatabaseManagementServiceBuilder(databaseLayout);
    factory.setFileSystem(fs);
    managementService = factory.setConfig(configuration()).build();
    return (GraphDatabaseAPI) managementService.database(DEFAULT_DATABASE_NAME);
}
Also used : TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI)

Example 30 with TestDatabaseManagementServiceBuilder

use of org.neo4j.test.TestDatabaseManagementServiceBuilder in project neo4j by neo4j.

the class BoltSchedulerBusyIT method getTestGraphDatabaseFactory.

private TestDatabaseManagementServiceBuilder getTestGraphDatabaseFactory() {
    TestDatabaseManagementServiceBuilder factory = new TestDatabaseManagementServiceBuilder();
    factory.setInternalLogProvider(internalLogProvider);
    factory.setUserLogProvider(userLogProvider);
    return factory;
}
Also used : TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder)

Aggregations

TestDatabaseManagementServiceBuilder (org.neo4j.test.TestDatabaseManagementServiceBuilder)135 DatabaseManagementService (org.neo4j.dbms.api.DatabaseManagementService)74 Test (org.junit.jupiter.api.Test)48 Transaction (org.neo4j.graphdb.Transaction)42 GraphDatabaseService (org.neo4j.graphdb.GraphDatabaseService)38 GraphDatabaseAPI (org.neo4j.kernel.internal.GraphDatabaseAPI)30 Path (java.nio.file.Path)23 BeforeEach (org.junit.jupiter.api.BeforeEach)18 Node (org.neo4j.graphdb.Node)18 EphemeralFileSystemAbstraction (org.neo4j.io.fs.EphemeralFileSystemAbstraction)13 AssertableLogProvider (org.neo4j.logging.AssertableLogProvider)11 PageCache (org.neo4j.io.pagecache.PageCache)10 UncloseableDelegatingFileSystemAbstraction (org.neo4j.io.fs.UncloseableDelegatingFileSystemAbstraction)9 DatabaseLayout (org.neo4j.io.layout.DatabaseLayout)8 KernelTransaction (org.neo4j.kernel.api.KernelTransaction)7 TokenIndexProviderFactory (org.neo4j.kernel.impl.index.schema.TokenIndexProviderFactory)7 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)6 Dependencies (org.neo4j.collection.Dependencies)6 Config (org.neo4j.configuration.Config)6 DatabaseManagementServiceBuilder (org.neo4j.dbms.api.DatabaseManagementServiceBuilder)6