Search in sources :

Example 1 with InconsistencyLogger

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());
}
Also used : DefaultCounts(org.neo4j.consistency.statistics.DefaultCounts) RecordAccess(org.neo4j.consistency.store.RecordAccess) StoreAccess(org.neo4j.kernel.impl.store.StoreAccess) InconsistencyReport(org.neo4j.consistency.report.InconsistencyReport) CacheAccess(org.neo4j.consistency.checking.cache.CacheAccess) DefaultCacheAccess(org.neo4j.consistency.checking.cache.DefaultCacheAccess) InconsistencyLogger(org.neo4j.consistency.report.InconsistencyLogger) DefaultCacheAccess(org.neo4j.consistency.checking.cache.DefaultCacheAccess) ConsistencySummaryStatistics(org.neo4j.consistency.report.ConsistencySummaryStatistics) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 CacheAccess (org.neo4j.consistency.checking.cache.CacheAccess)1 DefaultCacheAccess (org.neo4j.consistency.checking.cache.DefaultCacheAccess)1 ConsistencySummaryStatistics (org.neo4j.consistency.report.ConsistencySummaryStatistics)1 InconsistencyLogger (org.neo4j.consistency.report.InconsistencyLogger)1 InconsistencyReport (org.neo4j.consistency.report.InconsistencyReport)1 DefaultCounts (org.neo4j.consistency.statistics.DefaultCounts)1 RecordAccess (org.neo4j.consistency.store.RecordAccess)1 StoreAccess (org.neo4j.kernel.impl.store.StoreAccess)1