use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class PropertyEncoderStepTest method setUpNeoStore.
@Before
public void setUpNeoStore() {
File storeDir = new File("dir");
pageCache = pageCacheRule.getPageCache(fsRule.get());
StoreFactory factory = new StoreFactory(storeDir, pageCache, fsRule.get(), NullLogProvider.getInstance());
neoStores = factory.openAllNeoStores(true);
}
use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class StoreUpgraderTest method upgradedNeoStoreShouldHaveNewUpgradeTimeAndUpgradeId.
@Test
public void upgradedNeoStoreShouldHaveNewUpgradeTimeAndUpgradeId() throws Exception {
// Given
fileSystem.deleteFile(new File(dbDirectory, StoreLogService.INTERNAL_LOG_NAME));
PageCache pageCache = pageCacheRule.getPageCache(fileSystem);
UpgradableDatabase upgradableDatabase = new UpgradableDatabase(fileSystem, new StoreVersionCheck(pageCache), new LegacyStoreVersionCheck(fileSystem), getRecordFormats());
// When
newUpgrader(upgradableDatabase, allowMigrateConfig, pageCache).migrateIfNeeded(dbDirectory);
// Then
StoreFactory factory = new StoreFactory(dbDirectory, pageCache, fileSystem, NullLogProvider.getInstance());
try (NeoStores neoStores = factory.openAllNeoStores()) {
assertThat(neoStores.getMetaDataStore().getUpgradeTransaction(), equalTo(neoStores.getMetaDataStore().getLastCommittedTransaction()));
assertThat(neoStores.getMetaDataStore().getUpgradeTime(), not(equalTo(MetaDataStore.FIELD_NOT_INITIALIZED)));
long minuteAgo = System.currentTimeMillis() - MINUTES.toMillis(1);
assertThat(neoStores.getMetaDataStore().getUpgradeTime(), greaterThan(minuteAgo));
}
}
use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class PropertyPhysicalToLogicalConverterTest method before.
@Before
public void before() throws Exception {
File storeDir = new File("dir");
fs.get().mkdirs(storeDir);
StoreFactory storeFactory = new StoreFactory(storeDir, Config.empty(), new DefaultIdGeneratorFactory(fs.get()), pageCacheRule.getPageCache(fs.get()), fs.get(), NullLogProvider.getInstance());
neoStores = storeFactory.openAllNeoStores(true);
store = neoStores.getPropertyStore();
converter = new PropertyPhysicalToLogicalConverter(store);
}
use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class StoreSingleRelationshipCursorTest method setUp.
@Before
public void setUp() {
StoreFactory storeFactory = getStoreFactory();
neoStores = storeFactory.openAllNeoStores(true);
}
use of org.neo4j.kernel.impl.store.StoreFactory in project neo4j by neo4j.
the class StoreNodeRelationshipCursorTest method setupStores.
@BeforeClass
public static void setupStores() {
File storeDir = directory.absolutePath();
fs = new DefaultFileSystemAbstraction();
pageCache = new ConfiguringPageCacheFactory(fs, Config.defaults().augment(stringMap(pagecache_memory.name(), "8m")), NULL, PageCursorTracerSupplier.NULL, NullLog.getInstance()).getOrCreatePageCache();
StoreFactory storeFactory = new StoreFactory(storeDir, pageCache, fs, NullLogProvider.getInstance());
neoStores = storeFactory.openAllNeoStores(true);
}
Aggregations