Search in sources :

Example 1 with ConsistencyCheckingApplier

use of org.neo4j.internal.recordstorage.ConsistencyCheckingApplierFactory.ConsistencyCheckingApplier in project neo4j by neo4j.

the class ConsistencyCheckingApplierTest method setUp.

@BeforeEach
void setUp() {
    Config config = Config.defaults(neo4j_home, directory.homePath());
    DatabaseLayout layout = DatabaseLayout.of(config);
    neoStores = new StoreFactory(layout, config, new DefaultIdGeneratorFactory(directory.getFileSystem(), immediate(), DEFAULT_DATABASE_NAME), pageCache, directory.getFileSystem(), NullLogProvider.getInstance(), PageCacheTracer.NULL, writable()).openAllNeoStores(true);
    RelationshipStore relationshipStore = neoStores.getRelationshipStore();
    checker = new ConsistencyCheckingApplier(relationshipStore, CursorContext.NULL);
    BatchContext batchContext = mock(BatchContext.class);
    when(batchContext.getLockGroup()).thenReturn(new LockGroup());
    applier = new NeoStoreTransactionApplier(CommandVersion.AFTER, neoStores, mock(CacheAccessBackDoor.class), LockService.NO_LOCK_SERVICE, 0, batchContext, CursorContext.NULL);
    appliers = new TransactionApplier[] { checker, applier };
}
Also used : LockGroup(org.neo4j.lock.LockGroup) Config(org.neo4j.configuration.Config) DatabaseLayout(org.neo4j.io.layout.DatabaseLayout) DefaultIdGeneratorFactory(org.neo4j.internal.id.DefaultIdGeneratorFactory) RelationshipStore(org.neo4j.kernel.impl.store.RelationshipStore) StoreFactory(org.neo4j.kernel.impl.store.StoreFactory) ConsistencyCheckingApplier(org.neo4j.internal.recordstorage.ConsistencyCheckingApplierFactory.ConsistencyCheckingApplier) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)1 Config (org.neo4j.configuration.Config)1 DefaultIdGeneratorFactory (org.neo4j.internal.id.DefaultIdGeneratorFactory)1 ConsistencyCheckingApplier (org.neo4j.internal.recordstorage.ConsistencyCheckingApplierFactory.ConsistencyCheckingApplier)1 DatabaseLayout (org.neo4j.io.layout.DatabaseLayout)1 RelationshipStore (org.neo4j.kernel.impl.store.RelationshipStore)1 StoreFactory (org.neo4j.kernel.impl.store.StoreFactory)1 LockGroup (org.neo4j.lock.LockGroup)1