use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_existing_3.
@Test
public void params_choose_existing_3() {
StoreParams p = Build.decideStoreParams(Location.mem(), false, null, pLoc, pDft);
// p is pLoc
assertTrue(StoreParams.sameValues(p, pLoc));
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_4.
@Test
public void params_choose_new_4() {
StoreParams p = Build.decideStoreParams(Location.mem(), true, pApp, pLoc, pDft);
// New store, pLoc, no pApp, so pLoc is the entire settings.
assertFalse(StoreParams.sameValues(p, pApp));
assertFalse(StoreParams.sameValues(p, pLoc));
assertFalse(StoreParams.sameValues(p, pDft));
assertEquals(0, p.getBlockSize().intValue());
assertEquals(12, p.getNodeMissCacheSize().intValue());
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_persist_3.
@Test
public void params_choose_new_persist_3() {
// new database, location defined, application modified.
Location loc = Location.create(DIR);
FileOps.clearAll(loc.getDirectoryPath());
StoreParamsCodec.write(loc, pLoc);
// Clear.
StoreParams p = Build.decideStoreParams(loc, true, pApp, pLoc, pDft);
// Check location still has a pLoc.
String fn = loc.getPath(StoreParamsConst.TDB_CONFIG_FILE);
assertTrue(FileOps.exists(fn));
StoreParams pLoc2 = StoreParamsCodec.read(loc);
assertFalse(StoreParams.sameValues(pLoc, p));
// Location
assertEquals(0, p.getBlockSize().intValue());
// Application
assertEquals(12, p.getNodeMissCacheSize().intValue());
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_1.
@Test
public void params_choose_new_1() {
StoreParams p = Build.decideStoreParams(Location.mem(), true, null, null, pDft);
// New store, no pLoc, no pApp so pDft.
assertTrue(StoreParams.sameValues(p, pDft));
}
use of org.apache.jena.tdb.setup.StoreParams in project jena by apache.
the class TestStoreParamsCreate method params_reconnect_01.
// Defaults
@Test
public void params_reconnect_01() {
// Create.
StoreConnection.make(loc, null);
// Drop.
StoreConnection.expel(loc, true);
// Reconnect
StoreConnection.make(loc, null);
StoreParams pLoc = StoreParamsCodec.read(loc);
assertNull(pLoc);
StoreParams pDB = StoreConnection.getExisting(loc).getBaseDataset().getConfig().params;
assertNotNull(pDB);
// Should be the default setup.
assertTrue(StoreParams.sameValues(pDft, pDB));
}
Aggregations