Search in sources :

Example 1 with IndexPopulation

use of org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.IndexPopulation in project neo4j by neo4j.

the class MultipleIndexPopulatorTest method testFailByNonExistingPopulation.

@Test
public void testFailByNonExistingPopulation() throws IOException {
    IndexPopulation nonExistingPopulation = mock(IndexPopulation.class);
    IndexPopulator populator = createIndexPopulator();
    addPopulator(populator, 1);
    multipleIndexPopulator.fail(nonExistingPopulation, getPopulatorException());
    verify(populator, never()).markAsFailed(anyString());
}
Also used : IndexPopulator(org.neo4j.kernel.api.index.IndexPopulator) IndexPopulation(org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.IndexPopulation) Test(org.junit.Test)

Example 2 with IndexPopulation

use of org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.IndexPopulation in project neo4j by neo4j.

the class MultipleIndexPopulatorTest method testFailByPopulation.

@Test
public void testFailByPopulation() throws IOException {
    IndexPopulator populator1 = createIndexPopulator();
    IndexPopulator populator2 = createIndexPopulator();
    addPopulator(populator1, 1);
    IndexPopulation population2 = addPopulator(populator2, 2);
    multipleIndexPopulator.fail(population2, getPopulatorException());
    verify(populator1, never()).markAsFailed(anyString());
    checkPopulatorFailure(populator2);
}
Also used : IndexPopulator(org.neo4j.kernel.api.index.IndexPopulator) IndexPopulation(org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.IndexPopulation) Test(org.junit.Test)

Example 3 with IndexPopulation

use of org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.IndexPopulation in project neo4j by neo4j.

the class MultipleIndexPopulatorTest method testFailByPopulationRemovesPopulator.

@Test
public void testFailByPopulationRemovesPopulator() throws IOException {
    IndexPopulator populator1 = createIndexPopulator();
    IndexPopulator populator2 = createIndexPopulator();
    IndexPopulation population1 = addPopulator(populator1, 1);
    IndexPopulation population2 = addPopulator(populator2, 2);
    multipleIndexPopulator.fail(population1, getPopulatorException());
    multipleIndexPopulator.fail(population2, getPopulatorException());
    checkPopulatorFailure(populator1);
    checkPopulatorFailure(populator2);
    assertFalse(multipleIndexPopulator.hasPopulators());
}
Also used : IndexPopulator(org.neo4j.kernel.api.index.IndexPopulator) IndexPopulation(org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.IndexPopulation) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 IndexPopulator (org.neo4j.kernel.api.index.IndexPopulator)3 IndexPopulation (org.neo4j.kernel.impl.api.index.MultipleIndexPopulator.IndexPopulation)3