use of org.neo4j.consistency.report.InconsistencyLogger in project neo4j by neo4j.
the class ExecutionOrderIntegrationTest method shouldRunChecksInSingleThreadedPass.
@Test
public void shouldRunChecksInSingleThreadedPass() throws Exception {
// given
StoreAccess store = fixture.directStoreAccess().nativeStores();
int threads = defaultConsistencyCheckThreadsNumber();
CacheAccess cacheAccess = new DefaultCacheAccess(new DefaultCounts(threads), threads);
RecordAccess access = FullCheck.recordAccess(store, cacheAccess);
FullCheck singlePass = new FullCheck(getTuningConfiguration(), ProgressMonitorFactory.NONE, Statistics.NONE, threads);
ConsistencySummaryStatistics singlePassSummary = new ConsistencySummaryStatistics();
InconsistencyLogger logger = mock(InconsistencyLogger.class);
InvocationLog singlePassChecks = new InvocationLog();
// when
singlePass.execute(fixture.directStoreAccess(), new LogDecorator(singlePassChecks), access, new InconsistencyReport(logger, singlePassSummary), cacheAccess, NO_MONITOR);
// then
verifyZeroInteractions(logger);
assertEquals("Expected no inconsistencies in single pass.", 0, singlePassSummary.getTotalInconsistencyCount());
}
Aggregations