use of org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException in project neo4j by neo4j.
the class FusionIndexPopulatorTest method verifyDeferredConstraintsMustThrowIfAnyThrow.
/* verifyDeferredConstraints */
@Test
void verifyDeferredConstraintsMustThrowIfAnyThrow() throws Exception {
for (IndexPopulator alivePopulator : alivePopulators) {
// given
IndexEntryConflictException failure = mock(IndexEntryConflictException.class);
doThrow(failure).when(alivePopulator).verifyDeferredConstraints(any());
verifyCallFail(failure, () -> {
fusionIndexPopulator.verifyDeferredConstraints(null);
return null;
});
// reset throw for testing of next populator
doAnswer(invocation -> null).when(alivePopulator).verifyDeferredConstraints(any());
}
}
Aggregations