use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsCreate method params_create_02.
@Test
public void params_create_02() {
StoreConnection.connectCreate(loc, pApp);
// Check. Custom setup.
assertTrue("DB directory", Files.exists(db));
assertTrue("Config file not found", Files.exists(cfg));
StoreParams pLoc = StoreParamsCodec.read(loc);
assertTrue(StoreParams.sameValues(pLoc, pApp));
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_existing_2.
@Test
public void params_choose_existing_2() {
StoreParams p = StoreParamsFactory.decideStoreParams(Location.mem(), false, pApp, null, pDft);
// p is pLoc modified by pApp
assertFalse(StoreParams.sameValues(p, pApp));
assertFalse(StoreParams.sameValues(p, pDft));
// Existing store, no pLoc, so pDft is implicit pLoc and fixed the block size.
assertEquals(pDft.getBlockSize(), p.getBlockSize());
assertEquals(12, p.getNodeMissCacheSize().intValue());
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_existing_4.
@Test
public void params_choose_existing_4() {
StoreParams p = StoreParamsFactory.decideStoreParams(Location.mem(), false, pApp, pLoc, pDft);
// p is pLoc modifed by pApp.
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.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_persist_2.
@Test
public void params_choose_new_persist_2() {
// new database, location defined.
Location loc = Location.create(DIR);
FileOps.clearAll(loc.getDirectoryPath());
StoreParamsCodec.write(loc, pLoc);
// Clear.
StoreParams p = StoreParamsFactory.decideStoreParams(loc, true, null, pLoc, pDft);
// Check location still has a pLoc.
String fn = loc.getPath(Names.TDB_CONFIG_FILE);
assertTrue(FileOps.exists(fn));
StoreParams pLoc2 = StoreParamsCodec.read(loc);
assertTrue(StoreParams.sameValues(pLoc, p));
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_existing_3.
@Test
public void params_choose_existing_3() {
StoreParams p = StoreParamsFactory.decideStoreParams(Location.mem(), false, null, pLoc, pDft);
// p is pLoc
assertTrue(StoreParams.sameValues(p, pLoc));
}
Aggregations