@Before public void setUpNeoStore() throws Exception { targetDirectory = TargetDirectory.forTest(fs.get(), getClass()); path = targetDirectory.directory("dir", true); Config config = new Config(new HashMap<String, String>(), GraphDatabaseSettings.class); StoreFactory sf = new StoreFactory( config, new DefaultIdGeneratorFactory(), new DefaultWindowPoolFactory(), fs.get(), StringLogger.DEV_NULL, null); sf.createNeoStore(file(NeoStore.DEFAULT_NAME)).close(); }
@Test public void testSetBlockSize() throws Exception { targetDirectory.cleanup(); Config config = new Config( MapUtil.stringMap("string_block_size", "62", "array_block_size", "302"), GraphDatabaseSettings.class); StoreFactory sf = new StoreFactory( config, new DefaultIdGeneratorFactory(), new DefaultWindowPoolFactory(), fs.get(), StringLogger.DEV_NULL, null); sf.createNeoStore(file("neo")).close(); initializeStores(); assertEquals(62 + AbstractDynamicStore.BLOCK_HEADER_SIZE, pStore.getStringBlockSize()); assertEquals(302 + AbstractDynamicStore.BLOCK_HEADER_SIZE, pStore.getArrayBlockSize()); ds.stop(); }