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());
}
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);
}
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());
}
Aggregations