use of org.neo4j.kernel.impl.api.DatabaseSchemaState in project neo4j by neo4j.
the class IndexPopulationJobTest method shouldCloseMultiPopulatorOnSuccessfulPopulation.
@Test
void shouldCloseMultiPopulatorOnSuccessfulPopulation() {
// given
NullLogProvider logProvider = NullLogProvider.getInstance();
TrackingMultipleIndexPopulator populator = new TrackingMultipleIndexPopulator(IndexStoreView.EMPTY, logProvider, EntityType.NODE, new DatabaseSchemaState(logProvider), jobScheduler, tokens);
IndexPopulationJob populationJob = new IndexPopulationJob(populator, NO_MONITOR, false, NULL, INSTANCE, "", AUTH_DISABLED, EntityType.NODE, Config.defaults());
// when
populationJob.run();
// then
assertTrue(populator.closed);
}
use of org.neo4j.kernel.impl.api.DatabaseSchemaState in project neo4j by neo4j.
the class NeoStoresTest method reinitializeStores.
private void reinitializeStores(DatabaseLayout databaseLayout) {
Dependencies dependencies = new Dependencies();
Config config = Config.defaults(GraphDatabaseSettings.fail_on_missing_files, false);
dependencies.satisfyDependency(config);
closeStorageEngine();
IdGeneratorFactory idGeneratorFactory = new DefaultIdGeneratorFactory(fs, immediate(), databaseLayout.getDatabaseName());
TokenHolders tokenHolders = new TokenHolders(createReadOnlyTokenHolder(TokenHolder.TYPE_PROPERTY_KEY), createReadOnlyTokenHolder(TokenHolder.TYPE_LABEL), createReadOnlyTokenHolder(TokenHolder.TYPE_RELATIONSHIP_TYPE));
storageEngine = new RecordStorageEngine(databaseLayout, config, pageCache, fs, nullLogProvider(), tokenHolders, new DatabaseSchemaState(nullLogProvider()), new StandardConstraintRuleAccessor(), i -> i, NO_LOCK_SERVICE, mock(Health.class), idGeneratorFactory, new DefaultIdController(), immediate(), PageCacheTracer.NULL, true, INSTANCE, writable(), CommandLockVerification.Factory.IGNORE, LockVerificationMonitor.Factory.IGNORE);
life = new LifeSupport();
life.add(storageEngine);
life.add(storageEngine.schemaAndTokensLifecycle());
life.start();
NeoStores neoStores = storageEngine.testAccessNeoStores();
pStore = neoStores.getPropertyStore();
nodeStore = neoStores.getNodeStore();
storageReader = storageEngine.newReader();
}
Aggregations