Search in sources :

Example 16 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class EncodingIdMapperTest method tracePageCacheAccessOnCollisions.

@Test
public void tracePageCacheAccessOnCollisions() {
    EncodingIdMapper.Monitor monitor = mock(EncodingIdMapper.Monitor.class);
    Encoder encoder = mock(Encoder.class);
    when(encoder.encode(any())).thenReturn(12345L);
    var pageCacheTracer = new DefaultPageCacheTracer();
    IdMapper mapper = mapper(encoder, Radix.STRING, monitor, pageCacheTracer);
    PropertyValueLookup ids = (nodeId, cursorContext) -> {
        cursorContext.getCursorTracer().beginPin(false, 1, null).done();
        return nodeId + "";
    };
    int expectedCollisions = 2;
    for (int i = 0; i < expectedCollisions; i++) {
        mapper.put(ids.lookupProperty(i, NULL), i, Group.GLOBAL);
    }
    ProgressListener progress = mock(ProgressListener.class);
    Collector collector = mock(Collector.class);
    mapper.prepare(ids, collector, progress);
    verifyNoMoreInteractions(collector);
    verify(monitor).numberOfCollisions(expectedCollisions);
    assertEquals(expectedCollisions, pageCacheTracer.pins());
    assertEquals(expectedCollisions, pageCacheTracer.unpins());
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) NO_MONITOR(org.neo4j.internal.batchimport.cache.idmapping.string.EncodingIdMapper.NO_MONITOR) NumberArrayFactories(org.neo4j.internal.batchimport.cache.NumberArrayFactories) Collector(org.neo4j.internal.batchimport.input.Collector) CursorContext(org.neo4j.io.pagecache.context.CursorContext) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) Groups(org.neo4j.internal.batchimport.input.Groups) Random(java.util.Random) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) AtomicReference(java.util.concurrent.atomic.AtomicReference) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) RandomRule(org.neo4j.test.rule.RandomRule) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) MutableLong(org.apache.commons.lang3.mutable.MutableLong) IdMapper(org.neo4j.internal.batchimport.cache.idmapping.IdMapper) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) Assert.fail(org.junit.Assert.fail) Math.toIntExact(java.lang.Math.toIntExact) ProgressListener(org.neo4j.internal.helpers.progress.ProgressListener) NONE(org.neo4j.internal.helpers.progress.ProgressListener.NONE) Parameterized(org.junit.runners.Parameterized) LongFunction(java.util.function.LongFunction) PropertyValueLookup(org.neo4j.internal.batchimport.PropertyValueLookup) Collection(java.util.Collection) Set(java.util.Set) Test(org.junit.Test) Mockito.times(org.mockito.Mockito.times) UUID(java.util.UUID) Mockito.when(org.mockito.Mockito.when) Mockito.verify(org.mockito.Mockito.verify) AtomicLong(java.util.concurrent.atomic.AtomicLong) Factory(org.neo4j.function.Factory) GLOBAL(org.neo4j.internal.batchimport.input.Group.GLOBAL) List(java.util.List) INSTANCE(org.neo4j.memory.EmptyMemoryTracker.INSTANCE) Rule(org.junit.Rule) Group(org.neo4j.internal.batchimport.input.Group) Assert.assertFalse(org.junit.Assert.assertFalse) Race(org.neo4j.test.Race) Assert.assertEquals(org.junit.Assert.assertEquals) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Mockito.mock(org.mockito.Mockito.mock) PrimitiveLongCollections.count(org.neo4j.collection.PrimitiveLongCollections.count) ProgressListener(org.neo4j.internal.helpers.progress.ProgressListener) PropertyValueLookup(org.neo4j.internal.batchimport.PropertyValueLookup) Collector(org.neo4j.internal.batchimport.input.Collector) IdMapper(org.neo4j.internal.batchimport.cache.idmapping.IdMapper) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) Test(org.junit.Test)

Example 17 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class EncodingIdMapperTest method shouldPutFromMultipleThreads.

@Test
public void shouldPutFromMultipleThreads() throws Throwable {
    // GIVEN
    IdMapper idMapper = mapper(new StringEncoder(), Radix.STRING, EncodingIdMapper.NO_MONITOR);
    AtomicLong highNodeId = new AtomicLong();
    int batchSize = 1234;
    Race race = new Race();
    PropertyValueLookup inputIdLookup = (id, cursorContext) -> String.valueOf(id);
    int countPerThread = 30_000;
    race.addContestants(processors, () -> {
        int cursor = batchSize;
        long nextNodeId = 0;
        for (int j = 0; j < countPerThread; j++) {
            if (cursor == batchSize) {
                nextNodeId = highNodeId.getAndAdd(batchSize);
                cursor = 0;
            }
            long nodeId = nextNodeId++;
            cursor++;
            idMapper.put(inputIdLookup.lookupProperty(nodeId, NULL), nodeId, Group.GLOBAL);
        }
    });
    // WHEN
    race.go();
    idMapper.prepare(inputIdLookup, mock(Collector.class), ProgressListener.NONE);
    // THEN
    int count = processors * countPerThread;
    int countWithGapsWorstCase = count + batchSize * processors;
    int correctHits = 0;
    for (long nodeId = 0; nodeId < countWithGapsWorstCase; nodeId++) {
        long result = idMapper.get(inputIdLookup.lookupProperty(nodeId, NULL), Group.GLOBAL);
        if (result != -1) {
            assertEquals(nodeId, result);
            correctHits++;
        }
    }
    assertEquals(count, correctHits);
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) NO_MONITOR(org.neo4j.internal.batchimport.cache.idmapping.string.EncodingIdMapper.NO_MONITOR) NumberArrayFactories(org.neo4j.internal.batchimport.cache.NumberArrayFactories) Collector(org.neo4j.internal.batchimport.input.Collector) CursorContext(org.neo4j.io.pagecache.context.CursorContext) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) Groups(org.neo4j.internal.batchimport.input.Groups) Random(java.util.Random) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) AtomicReference(java.util.concurrent.atomic.AtomicReference) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) RandomRule(org.neo4j.test.rule.RandomRule) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) MutableLong(org.apache.commons.lang3.mutable.MutableLong) IdMapper(org.neo4j.internal.batchimport.cache.idmapping.IdMapper) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) Assert.fail(org.junit.Assert.fail) Math.toIntExact(java.lang.Math.toIntExact) ProgressListener(org.neo4j.internal.helpers.progress.ProgressListener) NONE(org.neo4j.internal.helpers.progress.ProgressListener.NONE) Parameterized(org.junit.runners.Parameterized) LongFunction(java.util.function.LongFunction) PropertyValueLookup(org.neo4j.internal.batchimport.PropertyValueLookup) Collection(java.util.Collection) Set(java.util.Set) Test(org.junit.Test) Mockito.times(org.mockito.Mockito.times) UUID(java.util.UUID) Mockito.when(org.mockito.Mockito.when) Mockito.verify(org.mockito.Mockito.verify) AtomicLong(java.util.concurrent.atomic.AtomicLong) Factory(org.neo4j.function.Factory) GLOBAL(org.neo4j.internal.batchimport.input.Group.GLOBAL) List(java.util.List) INSTANCE(org.neo4j.memory.EmptyMemoryTracker.INSTANCE) Rule(org.junit.Rule) Group(org.neo4j.internal.batchimport.input.Group) Assert.assertFalse(org.junit.Assert.assertFalse) Race(org.neo4j.test.Race) Assert.assertEquals(org.junit.Assert.assertEquals) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Mockito.mock(org.mockito.Mockito.mock) PrimitiveLongCollections.count(org.neo4j.collection.PrimitiveLongCollections.count) AtomicLong(java.util.concurrent.atomic.AtomicLong) Race(org.neo4j.test.Race) PropertyValueLookup(org.neo4j.internal.batchimport.PropertyValueLookup) Collector(org.neo4j.internal.batchimport.input.Collector) IdMapper(org.neo4j.internal.batchimport.cache.idmapping.IdMapper) Test(org.junit.Test)

Example 18 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class IdContextFactoryBuilderTest method createContextWithCustomIdGeneratorFactoryWhenProvided.

@Test
void createContextWithCustomIdGeneratorFactoryWhenProvided() throws IOException {
    IdGeneratorFactory idGeneratorFactory = mock(IdGeneratorFactory.class);
    Config config = defaults();
    IdContextFactory contextFactory = IdContextFactoryBuilder.of(fs, jobScheduler, config, PageCacheTracer.NULL).withIdGenerationFactoryProvider(any -> idGeneratorFactory).build();
    DatabaseIdContext idContext = contextFactory.createIdContext(databaseIdRepository.getByName("database").get());
    IdGeneratorFactory bufferedGeneratorFactory = idContext.getIdGeneratorFactory();
    assertThat(idContext.getIdController()).isInstanceOf(BufferedIdController.class);
    assertThat(bufferedGeneratorFactory).isInstanceOf(BufferingIdGeneratorFactory.class);
    ((BufferingIdGeneratorFactory) bufferedGeneratorFactory).initialize(() -> mock(KernelTransactionsSnapshot.class));
    Path file = testDirectory.file("a");
    IdType idType = IdType.NODE;
    LongSupplier highIdSupplier = () -> 0;
    int maxId = 100;
    idGeneratorFactory.open(pageCache, file, idType, highIdSupplier, maxId, writable(), config, NULL, immutable.empty());
    verify(idGeneratorFactory).open(pageCache, file, idType, highIdSupplier, maxId, writable(), config, NULL, immutable.empty());
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Sets.immutable(org.eclipse.collections.api.factory.Sets.immutable) LongSupplier(java.util.function.LongSupplier) IdGeneratorFactory(org.neo4j.internal.id.IdGeneratorFactory) Config.defaults(org.neo4j.configuration.Config.defaults) DatabaseIdFactory.from(org.neo4j.kernel.database.DatabaseIdFactory.from) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Config(org.neo4j.configuration.Config) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) Function(java.util.function.Function) BufferedIdController(org.neo4j.internal.id.BufferedIdController) TestDatabaseIdRepository(org.neo4j.kernel.database.TestDatabaseIdRepository) Inject(org.neo4j.test.extension.Inject) IdGenerator(org.neo4j.internal.id.IdGenerator) PageCacheTracer(org.neo4j.io.pagecache.tracing.PageCacheTracer) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) BufferingIdGeneratorFactory(org.neo4j.internal.id.BufferingIdGeneratorFactory) JobScheduler(org.neo4j.scheduler.JobScheduler) Path(java.nio.file.Path) DatabaseIdRepository(org.neo4j.kernel.database.DatabaseIdRepository) PageCache(org.neo4j.io.pagecache.PageCache) PageCacheExtension(org.neo4j.test.extension.pagecache.PageCacheExtension) DatabaseReadOnlyChecker.writable(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.writable) TestDirectory(org.neo4j.test.rule.TestDirectory) IOException(java.io.IOException) UUID(java.util.UUID) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) IdType(org.neo4j.internal.id.IdType) DefaultFileSystemAbstraction(org.neo4j.io.fs.DefaultFileSystemAbstraction) KernelTransactionsSnapshot(org.neo4j.kernel.impl.api.KernelTransactionsSnapshot) Mockito.mock(org.mockito.Mockito.mock) Path(java.nio.file.Path) Config(org.neo4j.configuration.Config) BufferingIdGeneratorFactory(org.neo4j.internal.id.BufferingIdGeneratorFactory) IdGeneratorFactory(org.neo4j.internal.id.IdGeneratorFactory) BufferingIdGeneratorFactory(org.neo4j.internal.id.BufferingIdGeneratorFactory) LongSupplier(java.util.function.LongSupplier) KernelTransactionsSnapshot(org.neo4j.kernel.impl.api.KernelTransactionsSnapshot) IdType(org.neo4j.internal.id.IdType) Test(org.junit.jupiter.api.Test)

Example 19 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class IndexedIdGeneratorTest method shouldNotStartWithoutFileIfReadOnly.

@Test
void shouldNotStartWithoutFileIfReadOnly() {
    Path file = directory.file("non-existing");
    final IllegalStateException e = assertThrows(IllegalStateException.class, () -> new IndexedIdGenerator(pageCache, file, immediate(), IdType.LABEL_TOKEN, false, () -> 0, MAX_ID, readOnly(), Config.defaults(), DEFAULT_DATABASE_NAME, NULL));
    assertTrue(Exceptions.contains(e, t -> t instanceof ReadOnlyDbException));
    assertTrue(Exceptions.contains(e, t -> t instanceof TreeFileNotFoundException));
    assertTrue(Exceptions.contains(e, t -> t instanceof IllegalStateException));
}
Also used : Path(java.nio.file.Path) BeforeEach(org.junit.jupiter.api.BeforeEach) Arrays(java.util.Arrays) DatabaseReadOnlyChecker.readOnly(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.readOnly) LongSupplier(java.util.function.LongSupplier) RandomExtension(org.neo4j.test.extension.RandomExtension) CursorContext(org.neo4j.io.pagecache.context.CursorContext) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Assertions.assertNotEquals(org.junit.jupiter.api.Assertions.assertNotEquals) Random(java.util.Random) Config(org.neo4j.configuration.Config) DefaultPageCacheTracer(org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer) MutableLongList(org.eclipse.collections.api.list.primitive.MutableLongList) DEFAULT_DATABASE_NAME(org.neo4j.configuration.GraphDatabaseSettings.DEFAULT_DATABASE_NAME) Future(java.util.concurrent.Future) 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) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) IdValidator(org.neo4j.internal.id.IdValidator) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) Path(java.nio.file.Path) Exceptions(org.neo4j.internal.helpers.Exceptions) PageCache(org.neo4j.io.pagecache.PageCache) DatabaseReadOnlyChecker.writable(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker.writable) Collection(java.util.Collection) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Set(java.util.Set) TestDirectory(org.neo4j.test.rule.TestDirectory) Test(org.junit.jupiter.api.Test) IdType(org.neo4j.internal.id.IdType) Stream(java.util.stream.Stream) Sets.immutable(org.eclipse.collections.impl.factory.Sets.immutable) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) LongArrayList(org.eclipse.collections.impl.list.mutable.primitive.LongArrayList) Race.throwing(org.neo4j.test.Race.throwing) DatabaseReadOnlyChecker(org.neo4j.configuration.helpers.DatabaseReadOnlyChecker) Assertions.assertDoesNotThrow(org.junit.jupiter.api.Assertions.assertDoesNotThrow) ConcurrentLinkedQueue(java.util.concurrent.ConcurrentLinkedQueue) Mockito.mock(org.mockito.Mockito.mock) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) GraphDatabaseSettings(org.neo4j.configuration.GraphDatabaseSettings) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TreeFileNotFoundException(org.neo4j.index.internal.gbptree.TreeFileNotFoundException) NO_FREE_IDS(org.neo4j.internal.id.FreeIds.NO_FREE_IDS) IDS_PER_ENTRY(org.neo4j.internal.id.indexed.IndexedIdGenerator.IDS_PER_ENTRY) LongList(org.eclipse.collections.api.list.primitive.LongList) FreeIds(org.neo4j.internal.id.FreeIds) Function(java.util.function.Function) ReadOnlyDbException(org.neo4j.kernel.api.exceptions.ReadOnlyDbException) Inject(org.neo4j.test.extension.Inject) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) OtherThreadExecutor(org.neo4j.test.OtherThreadExecutor) Sets(org.eclipse.collections.api.factory.Sets) IdCapacityExceededException(org.neo4j.internal.id.IdCapacityExceededException) ValueSource(org.junit.jupiter.params.provider.ValueSource) ReporterFactories.noopReporterFactory(org.neo4j.annotations.documented.ReporterFactories.noopReporterFactory) Barrier(org.neo4j.test.Barrier) PageCacheExtension(org.neo4j.test.extension.pagecache.PageCacheExtension) MutableLongIterator(org.eclipse.collections.api.iterator.MutableLongIterator) Iterator(java.util.Iterator) Collections.emptySet(java.util.Collections.emptySet) Files(java.nio.file.Files) IOException(java.io.IOException) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) RecoveryCleanupWorkCollector.immediate(org.neo4j.index.internal.gbptree.RecoveryCleanupWorkCollector.immediate) AfterEach(org.junit.jupiter.api.AfterEach) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest) Executable(org.junit.jupiter.api.function.Executable) Marker(org.neo4j.internal.id.IdGenerator.Marker) IdRange(org.neo4j.internal.id.IdRange) Comparator(java.util.Comparator) Race(org.neo4j.test.Race) ReadOnlyDbException(org.neo4j.kernel.api.exceptions.ReadOnlyDbException) TreeFileNotFoundException(org.neo4j.index.internal.gbptree.TreeFileNotFoundException) Test(org.junit.jupiter.api.Test) ParameterizedTest(org.junit.jupiter.params.ParameterizedTest)

Example 20 with NULL

use of org.neo4j.io.pagecache.context.CursorContext.NULL in project neo4j by neo4j.

the class DelayedBufferTest method shouldNotReleaseValuesUntilCrossedThreshold.

@Test
void shouldNotReleaseValuesUntilCrossedThreshold() {
    // GIVEN
    VerifyingConsumer consumer = new VerifyingConsumer(30);
    final AtomicLong txOpened = new AtomicLong();
    final AtomicLong txClosed = new AtomicLong();
    Supplier<Long> chunkThreshold = txOpened::get;
    Predicate<Long> safeThreshold = value -> txClosed.get() >= value;
    DelayedBuffer<Long> buffer = new DelayedBuffer<>(chunkThreshold, safeThreshold, 100, consumer);
    // Transaction spans like these:
    // 1 |-1--------2-------3---|
    // 2   |4--5---------|
    // 3       |---------6----|
    // 4        |7--8-|
    // 5          |--------9-------10-|
    // 6                  |--11----|
    // 7                    |-12---13---14--|
    // TIME|1-2-3-4-5-6-7-8-9-a-b-c-d-e-f-g-h-i-j|
    // POI     ^   ^     ^         ^     ^     ^
    // A   B     C         D     E     F
    // A
    // <-- TX 1
    txOpened.incrementAndGet();
    buffer.offer(1);
    // <-- TX 2
    txOpened.incrementAndGet();
    buffer.offer(4);
    buffer.maintenance(NULL);
    assertEquals(0, consumer.chunksAccepted());
    // B
    buffer.offer(5);
    // <-- TX 3
    txOpened.incrementAndGet();
    // <-- TX 4
    txOpened.incrementAndGet();
    buffer.offer(7);
    buffer.maintenance(NULL);
    assertEquals(0, consumer.chunksAccepted());
    // C
    // <-- TX 5
    txOpened.incrementAndGet();
    buffer.offer(2);
    buffer.offer(8);
    // TX 4 closes, but TXs with lower ids are still open
    buffer.maintenance(NULL);
    assertEquals(0, consumer.chunksAccepted());
    // D
    // TX 2 closes, but TXs with lower ids are still open
    buffer.offer(6);
    // <-- TX 6
    txOpened.incrementAndGet();
    buffer.offer(9);
    buffer.offer(3);
    // <-- TX 7
    txOpened.incrementAndGet();
    buffer.offer(11);
    // TX 3 closes, but TXs with lower ids are still open
    buffer.offer(12);
    // since 1-4 have now all closed
    txClosed.set(4);
    buffer.maintenance(NULL);
    consumer.assertHaveOnlySeen(1, 4, 5, 7);
    // E
    buffer.offer(10);
    // TX 6 closes, but TXs with lower ids are still open
    buffer.offer(13);
    // since 1-6 have now all closed
    txClosed.set(6);
    buffer.maintenance(NULL);
    consumer.assertHaveOnlySeen(1, 2, 4, 5, 7, 8);
    // F
    buffer.offer(14);
    // since 1-7 have now all closed
    txClosed.set(7);
    buffer.maintenance(NULL);
    consumer.assertHaveOnlySeen(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14);
}
Also used : Assertions.fail(org.junit.jupiter.api.Assertions.fail) Suppliers.singleton(org.neo4j.function.Suppliers.singleton) Predicate(java.util.function.Predicate) CursorContext(org.neo4j.io.pagecache.context.CursorContext) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) MILLISECONDS(java.util.concurrent.TimeUnit.MILLISECONDS) CONCURRENT(org.junit.jupiter.api.parallel.ExecutionMode.CONCURRENT) Supplier(java.util.function.Supplier) Test(org.junit.jupiter.api.Test) LockSupport(java.util.concurrent.locks.LockSupport) AtomicLong(java.util.concurrent.atomic.AtomicLong) FakeClock(org.neo4j.time.FakeClock) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) NULL(org.neo4j.io.pagecache.context.CursorContext.NULL) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) Execution(org.junit.jupiter.api.parallel.Execution) Clocks(org.neo4j.time.Clocks) Predicates.alwaysTrue(org.neo4j.function.Predicates.alwaysTrue) Race(org.neo4j.test.Race) Numbers.safeCastLongToInt(org.neo4j.internal.helpers.Numbers.safeCastLongToInt) Mockito.mock(org.mockito.Mockito.mock) AtomicLong(java.util.concurrent.atomic.AtomicLong) AtomicLong(java.util.concurrent.atomic.AtomicLong) Test(org.junit.jupiter.api.Test)

Aggregations

NULL (org.neo4j.io.pagecache.context.CursorContext.NULL)31 Test (org.junit.jupiter.api.Test)25 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)23 Assertions.assertTrue (org.junit.jupiter.api.Assertions.assertTrue)22 IOException (java.io.IOException)20 Inject (org.neo4j.test.extension.Inject)20 ArrayList (java.util.ArrayList)19 Assertions.assertFalse (org.junit.jupiter.api.Assertions.assertFalse)19 List (java.util.List)18 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)18 INSTANCE (org.neo4j.memory.EmptyMemoryTracker.INSTANCE)18 PageCache (org.neo4j.io.pagecache.PageCache)17 CursorContext (org.neo4j.io.pagecache.context.CursorContext)17 Assertions.assertThrows (org.junit.jupiter.api.Assertions.assertThrows)16 Path (java.nio.file.Path)15 DefaultPageCacheTracer (org.neo4j.io.pagecache.tracing.DefaultPageCacheTracer)15 RandomRule (org.neo4j.test.rule.RandomRule)15 BeforeEach (org.junit.jupiter.api.BeforeEach)14 Config (org.neo4j.configuration.Config)14 PageCacheTracer (org.neo4j.io.pagecache.tracing.PageCacheTracer)14