Search in sources :

Example 26 with ValueIndexEntryUpdate

use of org.neo4j.storageengine.api.ValueIndexEntryUpdate in project neo4j by neo4j.

the class NativeIndexPopulatorTests method shouldApplyLargeAmountOfInterleavedRandomUpdates.

@Test
void shouldApplyLargeAmountOfInterleavedRandomUpdates() throws Exception {
    // given
    populator.create();
    random.reset();
    Random updaterRandom = new Random(random.seed());
    Iterator<ValueIndexEntryUpdate<IndexDescriptor>> updates = valueCreatorUtil.randomUpdateGenerator(random);
    // when
    int count = interleaveLargeAmountOfUpdates(updaterRandom, updates);
    // then
    populator.scanCompleted(nullInstance, populationWorkScheduler, NULL);
    populator.close(true, NULL);
    random.reset();
    verifyUpdates(valueCreatorUtil.randomUpdateGenerator(random), count);
}
Also used : Random(java.util.Random) ValueIndexEntryUpdate(org.neo4j.storageengine.api.ValueIndexEntryUpdate) Test(org.junit.jupiter.api.Test)

Aggregations

ValueIndexEntryUpdate (org.neo4j.storageengine.api.ValueIndexEntryUpdate)26 Test (org.junit.jupiter.api.Test)15 IndexUpdater (org.neo4j.kernel.api.index.IndexUpdater)11 Value (org.neo4j.values.storable.Value)11 ArrayList (java.util.ArrayList)9 IndexDescriptor (org.neo4j.internal.schema.IndexDescriptor)9 PointValue (org.neo4j.values.storable.PointValue)6 HashSet (java.util.HashSet)5 Test (org.junit.Test)5 PropertyIndexQuery (org.neo4j.internal.kernel.api.PropertyIndexQuery)5 ValueType (org.neo4j.values.storable.ValueType)5 List (java.util.List)3 Arrays (java.util.Arrays)2 Collections (java.util.Collections)2 Random (java.util.Random)2 Set (java.util.Set)2 Collectors (java.util.stream.Collectors)2 MutableLong (org.apache.commons.lang3.mutable.MutableLong)2 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)2 IndexOrderCapability (org.neo4j.internal.schema.IndexOrderCapability)2