Search in sources :

Example 61 with LabelSchemaDescriptor

use of org.neo4j.internal.schema.LabelSchemaDescriptor in project neo4j by neo4j.

the class FusionIndexUpdaterTest method verifyAddWithCorrectUpdater.

private void verifyAddWithCorrectUpdater(IndexUpdater correctPopulator, Value... numberValues) throws IndexEntryConflictException {
    IndexEntryUpdate<LabelSchemaDescriptor> update = add(numberValues);
    fusionIndexUpdater.process(update);
    verify(correctPopulator).process(update);
    for (IndexUpdater populator : aliveUpdaters) {
        if (populator != correctPopulator) {
            verify(populator, never()).process(update);
        }
    }
}
Also used : LabelSchemaDescriptor(org.neo4j.internal.schema.LabelSchemaDescriptor) IndexUpdater(org.neo4j.kernel.api.index.IndexUpdater) SwallowingIndexUpdater(org.neo4j.kernel.impl.api.index.SwallowingIndexUpdater)

Example 62 with LabelSchemaDescriptor

use of org.neo4j.internal.schema.LabelSchemaDescriptor in project neo4j by neo4j.

the class FusionIndexUpdaterTest method verifyChangeWithCorrectUpdaterNotMixed.

private void verifyChangeWithCorrectUpdaterNotMixed(IndexUpdater correctPopulator, Value before, Value after) throws IndexEntryConflictException {
    IndexEntryUpdate<LabelSchemaDescriptor> update = FusionIndexTestHelp.change(before, after);
    fusionIndexUpdater.process(update);
    verify(correctPopulator).process(update);
    for (IndexUpdater populator : aliveUpdaters) {
        if (populator != correctPopulator) {
            verify(populator, never()).process(update);
        }
    }
}
Also used : LabelSchemaDescriptor(org.neo4j.internal.schema.LabelSchemaDescriptor) IndexUpdater(org.neo4j.kernel.api.index.IndexUpdater) SwallowingIndexUpdater(org.neo4j.kernel.impl.api.index.SwallowingIndexUpdater)

Example 63 with LabelSchemaDescriptor

use of org.neo4j.internal.schema.LabelSchemaDescriptor in project neo4j by neo4j.

the class FusionIndexUpdaterTest method verifyRemoveWithCorrectUpdater.

private void verifyRemoveWithCorrectUpdater(IndexUpdater correctPopulator, Value... numberValues) throws IndexEntryConflictException {
    IndexEntryUpdate<LabelSchemaDescriptor> update = FusionIndexTestHelp.remove(numberValues);
    fusionIndexUpdater.process(update);
    verify(correctPopulator).process(update);
    for (IndexUpdater populator : aliveUpdaters) {
        if (populator != correctPopulator) {
            verify(populator, never()).process(update);
        }
    }
}
Also used : LabelSchemaDescriptor(org.neo4j.internal.schema.LabelSchemaDescriptor) IndexUpdater(org.neo4j.kernel.api.index.IndexUpdater) SwallowingIndexUpdater(org.neo4j.kernel.impl.api.index.SwallowingIndexUpdater)

Aggregations

LabelSchemaDescriptor (org.neo4j.internal.schema.LabelSchemaDescriptor)63 Test (org.junit.jupiter.api.Test)41 KernelTransaction (org.neo4j.kernel.api.KernelTransaction)24 IndexDescriptor (org.neo4j.internal.schema.IndexDescriptor)16 SchemaWrite (org.neo4j.internal.kernel.api.SchemaWrite)5 UniquenessConstraintDescriptor (org.neo4j.internal.schema.constraints.UniquenessConstraintDescriptor)5 Value (org.neo4j.values.storable.Value)5 Transaction (org.neo4j.graphdb.Transaction)4 ProcedureException (org.neo4j.internal.kernel.api.exceptions.ProcedureException)4 ConstraintDescriptor (org.neo4j.internal.schema.ConstraintDescriptor)4 IndexPopulator (org.neo4j.kernel.api.index.IndexPopulator)4 IndexUpdater (org.neo4j.kernel.api.index.IndexUpdater)4 HashMap (java.util.HashMap)3 HashSet (java.util.HashSet)3 RepeatedTest (org.junit.jupiter.api.RepeatedTest)3 ConsistencyReport (org.neo4j.consistency.report.ConsistencyReport)3 Node (org.neo4j.graphdb.Node)3 TokenRead (org.neo4j.internal.kernel.api.TokenRead)3 TokenWrite (org.neo4j.internal.kernel.api.TokenWrite)3 IndexConfig (org.neo4j.internal.schema.IndexConfig)3