use of org.neo4j.kernel.api.index.IndexPopulator 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.api.index.IndexPopulator 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.api.index.IndexPopulator 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());
}
use of org.neo4j.kernel.api.index.IndexPopulator in project neo4j by neo4j.
the class MultipleIndexPopulatorTest method testMultiplePopulatorCreationFailure.
@Test
public void testMultiplePopulatorCreationFailure() throws IOException {
IndexPopulator indexPopulator1 = createIndexPopulator();
IndexPopulator indexPopulator2 = createIndexPopulator();
IndexPopulator indexPopulator3 = createIndexPopulator();
doThrow(getPopulatorException()).when(indexPopulator1).create();
doThrow(getPopulatorException()).when(indexPopulator3).create();
addPopulator(indexPopulator1, 1);
addPopulator(indexPopulator2, 2);
addPopulator(indexPopulator3, 3);
multipleIndexPopulator.create();
checkPopulatorFailure(indexPopulator1);
checkPopulatorFailure(indexPopulator3);
verify(indexPopulator2).create();
}
use of org.neo4j.kernel.api.index.IndexPopulator in project neo4j by neo4j.
the class MultipleIndexPopulatorTest method testMultiplePopulatorsCreation.
@Test
public void testMultiplePopulatorsCreation() throws Exception {
IndexPopulator indexPopulator1 = createIndexPopulator();
IndexPopulator indexPopulator2 = createIndexPopulator();
addPopulator(indexPopulator1, 1);
addPopulator(indexPopulator2, 2);
multipleIndexPopulator.create();
verify(indexPopulator1).create();
verify(indexPopulator2).create();
}
Aggregations