Search in sources :

Example 11 with DEFAULT_DATABASE_NAME

use of org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME in project neo4j by neo4j.

the class GBPTreeTest method verifyHeader.

private void verifyHeader(PageCache pageCache, byte[] expectedHeader) throws IOException {
    // WHEN
    byte[] readHeader = new byte[expectedHeader.length];
    AtomicInteger length = new AtomicInteger();
    Header.Reader headerReader = headerData -> {
        length.set(headerData.limit());
        headerData.get(readHeader);
    };
    // Read as part of construction
    // open/close is enough to read header
    index(pageCache).with(headerReader).build().close();
    // THEN
    assertEquals(expectedHeader.length, length.get());
    assertArrayEquals(expectedHeader, readHeader);
    // WHEN
    // Read separate
    GBPTree.readHeader(pageCache, indexFile, headerReader, DEFAULT_DATABASE_NAME, NULL);
    assertEquals(expectedHeader.length, length.get());
    assertArrayEquals(expectedHeader, readHeader);
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) SimpleLongLayout.longLayout(org.neo4j.index.internal.gbptree.SimpleLongLayout.longLayout) NoSuchFileException(java.nio.file.NoSuchFileException) Arrays(java.util.Arrays) PageCursor(org.neo4j.io.pagecache.PageCursor) DatabaseReadOnlyChecker.readOnly(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.readOnly) RandomExtension(org.neo4j.test.extension.RandomExtension) CursorContext(org.neo4j.io.pagecache.context.CursorContext) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TimeoutException(java.util.concurrent.TimeoutException) Config(org.neo4j.configuration.Config) PageSwapper(org.neo4j.io.pagecache.PageSwapper) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) PF_SHARED_WRITE_LOCK(org.neo4j.io.pagecache.PagedFile.PF_SHARED_WRITE_LOCK) ByteBuffer(java.nio.ByteBuffer) PageCacheSupportExtension(org.neo4j.test.extension.pagecache.PageCacheSupportExtension) DefaultPageCursorTracer(org.neo4j.io.pagecache.tracing.cursor.DefaultPageCursorTracer) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) Future(java.util.concurrent.Future) StoreChannel(org.neo4j.io.fs.StoreChannel) Pair(org.apache.commons.lang3.tuple.Pair) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RandomRule(org.neo4j.test.rule.RandomRule) MutableLong(org.apache.commons.lang3.mutable.MutableLong) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) TestDirectoryExtension(org.neo4j.test.extension.testdirectory.TestDirectoryExtension) Path(java.nio.file.Path) PageCache(org.neo4j.io.pagecache.PageCache) ThrowingRunnable.throwing(org.neo4j.index.internal.gbptree.ThrowingRunnable.throwing) Monitor(org.neo4j.index.internal.gbptree.GBPTree.Monitor) StandardOpenOption(java.nio.file.StandardOpenOption) FileIsNotMappedException(org.neo4j.io.pagecache.impl.FileIsNotMappedException) Set(java.util.Set) TestDirectory(org.neo4j.test.rule.TestDirectory) Executors(java.util.concurrent.Executors) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) INSTANCE(org.neo4j.memory.EmptyMemoryTracker.INSTANCE) PinEvent(org.neo4j.io.pagecache.tracing.PinEvent) Sets.immutable(org.eclipse.collections.impl.factory.Sets.immutable) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Queue(java.util.Queue) MutableBoolean(org.apache.commons.lang3.mutable.MutableBoolean) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) PagedFile(org.neo4j.io.pagecache.PagedFile) DELETE_ON_CLOSE(java.nio.file.StandardOpenOption.DELETE_ON_CLOSE) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Callable(java.util.concurrent.Callable) AtomicReference(java.util.concurrent.atomic.AtomicReference) NO_HEADER_READER(org.neo4j.index.internal.gbptree.GBPTree.NO_HEADER_READER) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) DelegatingPageCache(org.neo4j.io.pagecache.DelegatingPageCache) Inject(org.neo4j.test.extension.Inject) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) RegisterExtension(org.junit.jupiter.api.extension.RegisterExtension) BiConsumer(java.util.function.BiConsumer) ThrowingConsumer(org.neo4j.function.ThrowingConsumer) ByteBuffers(org.neo4j.io.memory.ByteBuffers) Math.toIntExact(java.lang.Math.toIntExact) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) LinkedList(java.util.LinkedList) ExecutorService(java.util.concurrent.ExecutorService) OutputStream(java.io.OutputStream) ByteUnit(org.neo4j.io.ByteUnit) Barrier(org.neo4j.test.Barrier) OpenOption(java.nio.file.OpenOption) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) AfterEach(org.junit.jupiter.api.AfterEach) PageCacheConfig.config(org.neo4j.test.rule.PageCacheConfig.config) EphemeralFileSystemAbstraction(org.neo4j.io.fs.EphemeralFileSystemAbstraction) CREATE(java.nio.file.StandardOpenOption.CREATE) ImmutableSet(org.eclipse.collections.api.set.ImmutableSet) DelegatingPagedFile(org.neo4j.io.pagecache.DelegatingPagedFile) FileUtils.blockSize(org.neo4j.io.fs.FileUtils.blockSize) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) PageCacheConfig(org.neo4j.test.rule.PageCacheConfig) AtomicInteger(java.util.concurrent.atomic.AtomicInteger)

Example 12 with DEFAULT_DATABASE_NAME

use of org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME in project neo4j by neo4j.

the class GBPTreeTest method overwriteHeaderMustOnlyOverwriteHeaderNotState.

@Test
void overwriteHeaderMustOnlyOverwriteHeaderNotState() throws Exception {
    byte[] initialHeader = new byte[random.nextInt(100)];
    random.nextBytes(initialHeader);
    Consumer<PageCursor> headerWriter = pc -> pc.putBytes(initialHeader);
    try (PageCache pageCache = createPageCache(defaultPageSize)) {
        index(pageCache).with(headerWriter).build().close();
        Pair<TreeState, TreeState> treeStatesBeforeOverwrite = readTreeStates(pageCache);
        byte[] newHeader = new byte[random.nextInt(100)];
        random.nextBytes(newHeader);
        GBPTree.overwriteHeader(pageCache, indexFile, pc -> pc.putBytes(newHeader), DEFAULT_DATABASE_NAME, NULL);
        Pair<TreeState, TreeState> treeStatesAfterOverwrite = readTreeStates(pageCache);
        // TreeStates are the same
        assertEquals(treeStatesBeforeOverwrite.getLeft(), treeStatesAfterOverwrite.getLeft(), "expected tree state to exactly the same before and after overwriting header");
        assertEquals(treeStatesBeforeOverwrite.getRight(), treeStatesAfterOverwrite.getRight(), "expected tree state to exactly the same before and after overwriting header");
        // Verify header was actually overwritten. Do this after reading tree states because it will bump tree generation.
        verifyHeader(pageCache, newHeader);
    }
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) SimpleLongLayout.longLayout(org.neo4j.index.internal.gbptree.SimpleLongLayout.longLayout) NoSuchFileException(java.nio.file.NoSuchFileException) Arrays(java.util.Arrays) PageCursor(org.neo4j.io.pagecache.PageCursor) DatabaseReadOnlyChecker.readOnly(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.readOnly) RandomExtension(org.neo4j.test.extension.RandomExtension) CursorContext(org.neo4j.io.pagecache.context.CursorContext) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) TimeoutException(java.util.concurrent.TimeoutException) Config(org.neo4j.configuration.Config) PageSwapper(org.neo4j.io.pagecache.PageSwapper) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) PF_SHARED_WRITE_LOCK(org.neo4j.io.pagecache.PagedFile.PF_SHARED_WRITE_LOCK) ByteBuffer(java.nio.ByteBuffer) PageCacheSupportExtension(org.neo4j.test.extension.pagecache.PageCacheSupportExtension) DefaultPageCursorTracer(org.neo4j.io.pagecache.tracing.cursor.DefaultPageCursorTracer) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) Future(java.util.concurrent.Future) StoreChannel(org.neo4j.io.fs.StoreChannel) Pair(org.apache.commons.lang3.tuple.Pair) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) RandomRule(org.neo4j.test.rule.RandomRule) MutableLong(org.apache.commons.lang3.mutable.MutableLong) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) TestDirectoryExtension(org.neo4j.test.extension.testdirectory.TestDirectoryExtension) Path(java.nio.file.Path) PageCache(org.neo4j.io.pagecache.PageCache) ThrowingRunnable.throwing(org.neo4j.index.internal.gbptree.ThrowingRunnable.throwing) Monitor(org.neo4j.index.internal.gbptree.GBPTree.Monitor) StandardOpenOption(java.nio.file.StandardOpenOption) FileIsNotMappedException(org.neo4j.io.pagecache.impl.FileIsNotMappedException) Set(java.util.Set) TestDirectory(org.neo4j.test.rule.TestDirectory) Executors(java.util.concurrent.Executors) Test(org.junit.jupiter.api.Test) CountDownLatch(java.util.concurrent.CountDownLatch) List(java.util.List) INSTANCE(org.neo4j.memory.EmptyMemoryTracker.INSTANCE) PinEvent(org.neo4j.io.pagecache.tracing.PinEvent) Sets.immutable(org.eclipse.collections.impl.factory.Sets.immutable) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Queue(java.util.Queue) MutableBoolean(org.apache.commons.lang3.mutable.MutableBoolean) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) PagedFile(org.neo4j.io.pagecache.PagedFile) DELETE_ON_CLOSE(java.nio.file.StandardOpenOption.DELETE_ON_CLOSE) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) Callable(java.util.concurrent.Callable) AtomicReference(java.util.concurrent.atomic.AtomicReference) NO_HEADER_READER(org.neo4j.index.internal.gbptree.GBPTree.NO_HEADER_READER) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) DelegatingPageCache(org.neo4j.io.pagecache.DelegatingPageCache) Inject(org.neo4j.test.extension.Inject) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) RegisterExtension(org.junit.jupiter.api.extension.RegisterExtension) BiConsumer(java.util.function.BiConsumer) ThrowingConsumer(org.neo4j.function.ThrowingConsumer) ByteBuffers(org.neo4j.io.memory.ByteBuffers) Math.toIntExact(java.lang.Math.toIntExact) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) LinkedList(java.util.LinkedList) ExecutorService(java.util.concurrent.ExecutorService) OutputStream(java.io.OutputStream) ByteUnit(org.neo4j.io.ByteUnit) Barrier(org.neo4j.test.Barrier) OpenOption(java.nio.file.OpenOption) IOException(java.io.IOException) ExecutionException(java.util.concurrent.ExecutionException) TimeUnit(java.util.concurrent.TimeUnit) Consumer(java.util.function.Consumer) Assertions.assertArrayEquals(org.junit.jupiter.api.Assertions.assertArrayEquals) AfterEach(org.junit.jupiter.api.AfterEach) PageCacheConfig.config(org.neo4j.test.rule.PageCacheConfig.config) EphemeralFileSystemAbstraction(org.neo4j.io.fs.EphemeralFileSystemAbstraction) CREATE(java.nio.file.StandardOpenOption.CREATE) ImmutableSet(org.eclipse.collections.api.set.ImmutableSet) DelegatingPagedFile(org.neo4j.io.pagecache.DelegatingPagedFile) FileUtils.blockSize(org.neo4j.io.fs.FileUtils.blockSize) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) PageCacheConfig(org.neo4j.test.rule.PageCacheConfig) PageCache(org.neo4j.io.pagecache.PageCache) DelegatingPageCache(org.neo4j.io.pagecache.DelegatingPageCache) PageCursor(org.neo4j.io.pagecache.PageCursor) Test(org.junit.jupiter.api.Test)

Example 13 with DEFAULT_DATABASE_NAME

use of org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME in project neo4j by neo4j.

the class GenericNativeIndexProviderTest method mustCompleteIndexDescriptorConfigurationsWithSpatialConfig.

@Test
void mustCompleteIndexDescriptorConfigurationsWithSpatialConfig() {
    // Given
    DatabaseIndexContext context = DatabaseIndexContext.builder(null, null, DEFAULT_DATABASE_NAME).build();
    GenericNativeIndexProvider provider = new GenericNativeIndexProvider(context, IndexDirectoryStructure.NONE, null, Config.defaults());
    LabelSchemaDescriptor incompleteSchema = SchemaDescriptor.forLabel(1, 1);
    IndexDescriptor incompleteDescriptor = IndexPrototype.forSchema(incompleteSchema, IndexProviderDescriptor.UNDECIDED).withName("index").materialise(1);
    // When
    IndexDescriptor completedDescriptor = provider.completeConfiguration(incompleteDescriptor);
    // Then
    IndexConfig sinfulIndexConfig = incompleteDescriptor.getIndexConfig();
    IndexConfig completedIndexConfig = completedDescriptor.getIndexConfig();
    assertEquals(0, sinfulIndexConfig.entries().count(p -> true), "expected sinful index config to have no entries");
    for (CoordinateReferenceSystem crs : CoordinateReferenceSystem.all()) {
        assertNotNull(completedIndexConfig.get(spatialMinSettingForCrs(crs).getSettingName()));
        assertNotNull(completedIndexConfig.get(spatialMaxSettingForCrs(crs).getSettingName()));
    }
}
Also used : DoubleArray(org.neo4j.values.storable.DoubleArray) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) HashMap(java.util.HashMap) Config(org.neo4j.configuration.Config) IndexDirectoryStructure(org.neo4j.kernel.api.index.IndexDirectoryStructure) Value(org.neo4j.values.storable.Value) LabelSchemaDescriptor(org.neo4j.internal.schema.LabelSchemaDescriptor) IndexSettingUtil.spatialMinSettingForCrs(org.neo4j.graphdb.schema.IndexSettingUtil.spatialMinSettingForCrs) Values(org.neo4j.values.storable.Values) Test(org.junit.jupiter.api.Test) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) IndexSettingUtil.spatialMaxSettingForCrs(org.neo4j.graphdb.schema.IndexSettingUtil.spatialMaxSettingForCrs) CoordinateReferenceSystem(org.neo4j.values.storable.CoordinateReferenceSystem) SchemaDescriptor(org.neo4j.internal.schema.SchemaDescriptor) IndexPrototype(org.neo4j.internal.schema.IndexPrototype) Map(java.util.Map) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) IndexProviderDescriptor(org.neo4j.internal.schema.IndexProviderDescriptor) IndexConfig(org.neo4j.internal.schema.IndexConfig) IndexConfig(org.neo4j.internal.schema.IndexConfig) LabelSchemaDescriptor(org.neo4j.internal.schema.LabelSchemaDescriptor) CoordinateReferenceSystem(org.neo4j.values.storable.CoordinateReferenceSystem) IndexDescriptor(org.neo4j.internal.schema.IndexDescriptor) Test(org.junit.jupiter.api.Test)

Example 14 with DEFAULT_DATABASE_NAME

use of org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME in project neo4j by neo4j.

the class DatabaseStartupTest method startTheDatabaseWithWrongVersionShouldFailWithUpgradeNotAllowed.

@Test
void startTheDatabaseWithWrongVersionShouldFailWithUpgradeNotAllowed() throws Throwable {
    // given
    // create a store
    DatabaseManagementService managementService = new TestDatabaseManagementServiceBuilder(databaseLayout).build();
    GraphDatabaseAPI db = (GraphDatabaseAPI) managementService.database(DEFAULT_DATABASE_NAME);
    try (Transaction tx = db.beginTx()) {
        tx.createNode();
        tx.commit();
    }
    managementService.shutdown();
    // mess up the version in the metadatastore
    try (FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction();
        ThreadPoolJobScheduler scheduler = new ThreadPoolJobScheduler();
        PageCache pageCache = createPageCache(fileSystem, scheduler, PageCacheTracer.NULL)) {
        MetaDataStore.setRecord(pageCache, databaseLayout.metadataStore(), MetaDataStore.Position.STORE_VERSION, MetaDataStore.versionStringToLong("bad"), databaseLayout.getDatabaseName(), NULL);
    }
    managementService = new TestDatabaseManagementServiceBuilder(databaseLayout).build();
    GraphDatabaseAPI databaseService = (GraphDatabaseAPI) managementService.database(DEFAULT_DATABASE_NAME);
    try {
        assertThrows(DatabaseShutdownException.class, databaseService::beginTx);
        DatabaseStateService dbStateService = databaseService.getDependencyResolver().resolveDependency(DatabaseStateService.class);
        assertTrue(dbStateService.causeOfFailure(databaseService.databaseId()).isPresent());
        Throwable throwable = findCauseOrSuppressed(dbStateService.causeOfFailure(databaseService.databaseId()).get(), e -> e instanceof IllegalArgumentException).get();
        assertEquals("Unknown store version 'bad'", throwable.getMessage());
    } finally {
        managementService.shutdown();
    }
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) LogAssertions.assertThat(org.neo4j.logging.LogAssertions.assertThat) StandalonePageCacheFactory.createPageCache(org.neo4j.io.pagecache.impl.muninn.StandalonePageCacheFactory.createPageCache) Config(org.neo4j.configuration.Config) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder) GraphDatabaseService(org.neo4j.graphdb.GraphDatabaseService) Inject(org.neo4j.test.extension.Inject) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) AssertableLogProvider(org.neo4j.logging.AssertableLogProvider) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) GraphDatabaseInternalSettings(org.neo4j.configuration.GraphDatabaseInternalSettings) DbmsInfo(org.neo4j.kernel.impl.factory.DbmsInfo) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Transaction(org.neo4j.graphdb.Transaction) Path(java.nio.file.Path) PageCache(org.neo4j.io.pagecache.PageCache) Exceptions.findCauseOrSuppressed(org.neo4j.internal.helpers.Exceptions.findCauseOrSuppressed) DatabaseManagementServiceBuilder(org.neo4j.dbms.api.DatabaseManagementServiceBuilder) IOException(java.io.IOException) Neo4jLayoutExtension(org.neo4j.test.extension.Neo4jLayoutExtension) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI) Test(org.junit.jupiter.api.Test) DatabaseStateService(org.neo4j.dbms.DatabaseStateService) ExternalDependencies(org.neo4j.graphdb.facade.ExternalDependencies) DefaultFileSystemAbstraction(org.neo4j.io.fs.DefaultFileSystemAbstraction) EphemeralFileSystemAbstraction(org.neo4j.io.fs.EphemeralFileSystemAbstraction) MetaDataStore(org.neo4j.kernel.impl.store.MetaDataStore) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) Optional(java.util.Optional) CommunityEditionModule(org.neo4j.graphdb.factory.module.edition.CommunityEditionModule) ThreadPoolJobScheduler(org.neo4j.test.scheduler.ThreadPoolJobScheduler) DatabaseShutdownException(org.neo4j.graphdb.DatabaseShutdownException) DatabaseManagementService(org.neo4j.dbms.api.DatabaseManagementService) DatabaseManagementServiceFactory(org.neo4j.graphdb.facade.DatabaseManagementServiceFactory) StoreUpgrader(org.neo4j.kernel.impl.storemigration.StoreUpgrader) GlobalModule(org.neo4j.graphdb.factory.module.GlobalModule) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) DefaultFileSystemAbstraction(org.neo4j.io.fs.DefaultFileSystemAbstraction) EphemeralFileSystemAbstraction(org.neo4j.io.fs.EphemeralFileSystemAbstraction) FileSystemAbstraction(org.neo4j.io.fs.FileSystemAbstraction) DefaultFileSystemAbstraction(org.neo4j.io.fs.DefaultFileSystemAbstraction) DatabaseStateService(org.neo4j.dbms.DatabaseStateService) TestDatabaseManagementServiceBuilder(org.neo4j.test.TestDatabaseManagementServiceBuilder) GraphDatabaseAPI(org.neo4j.kernel.internal.GraphDatabaseAPI) Transaction(org.neo4j.graphdb.Transaction) ThreadPoolJobScheduler(org.neo4j.test.scheduler.ThreadPoolJobScheduler) DatabaseManagementService(org.neo4j.dbms.api.DatabaseManagementService) StandalonePageCacheFactory.createPageCache(org.neo4j.io.pagecache.impl.muninn.StandalonePageCacheFactory.createPageCache) PageCache(org.neo4j.io.pagecache.PageCache) Test(org.junit.jupiter.api.Test)

Aggregations

DEFAULT_DATABASE_NAME (org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME)14 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)13 Test (org.junit.jupiter.api.Test)12 IOException (java.io.IOException)11 Assertions.assertTrue (org.junit.jupiter.api.Assertions.assertTrue)11 Inject (org.neo4j.test.extension.Inject)11 Path (java.nio.file.Path)10 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)9 PageCache (org.neo4j.io.pagecache.PageCache)9 RandomRule (org.neo4j.test.rule.RandomRule)9 TestDirectory (org.neo4j.test.rule.TestDirectory)9 ArrayList (java.util.ArrayList)8 Assertions.assertFalse (org.junit.jupiter.api.Assertions.assertFalse)8 ExtendWith (org.junit.jupiter.api.extension.ExtendWith)8 Config (org.neo4j.configuration.Config)8 RandomExtension (org.neo4j.test.extension.RandomExtension)8 List (java.util.List)7 Set (java.util.Set)7 AfterEach (org.junit.jupiter.api.AfterEach)7 Assertions.assertThrows (org.junit.jupiter.api.Assertions.assertThrows)7