use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParams method store_params_04.
@Test
public void store_params_04() {
StoreParams params = StoreParams.builder().build();
StoreParams params2 = roundTrip(params);
assertEqualsStoreParams(params, params2);
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsCreate method params_reconnect_01.
// Defaults
@Test
public void params_reconnect_01() {
// Create.
StoreConnection.connectCreate(loc);
// Drop.
expel();
// Reconnect
StoreConnection.connectCreate(loc, null);
StoreParams pLoc = StoreParamsCodec.read(loc);
assertNull(pLoc);
StoreParams pDB = StoreConnection.connectExisting(loc).getDatasetGraphTDB().getStoreParams();
assertNotNull(pDB);
// Should be the default setup.
assertTrue(StoreParams.sameValues(pDft, pDB));
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsCreate method params_reconnect_03.
// Custom, then reconnect with some special settings.
@Test
public void params_reconnect_03() {
// Create.
StoreConnection.connectCreate(loc, pApp);
// Drop.
expel();
// Reconnect
StoreConnection.connectCreate(loc, pSpecial);
// StoreParams pLoc = StoreParamsCodec.read(loc);
// assertNotNull(pLoc);
StoreParams pDB = StoreConnection.connectExisting(loc).getDatasetGraphTDB().getStoreParams();
assertNotNull(pDB);
// Should be the default setup, modified by pApp for cache sizes.
assertFalse(StoreParams.sameValues(pApp, pDB));
assertFalse(StoreParams.sameValues(pSpecial, pDB));
// Check it's default-modified-by-special.
assertEquals(pSpecial.getBlockReadCacheSize(), pDB.getBlockReadCacheSize());
assertNotEquals(pApp.getBlockReadCacheSize(), pDB.getBlockReadCacheSize());
assertNotEquals(pSpecial.getBlockSize(), pDB.getBlockSize());
assertEquals(pApp.getBlockSize(), pDB.getBlockSize());
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_2.
@Test
public void params_choose_new_2() {
StoreParams p = StoreParamsFactory.decideStoreParams(Location.mem(), true, pApp, null, pDft);
// New store, no pLoc, so pApp is the enire settings.
assertEquals(12, p.getBlockSize().intValue());
assertTrue(StoreParams.sameValues(p, pApp));
}
use of org.apache.jena.tdb2.params.StoreParams in project jena by apache.
the class TestStoreParamsChoose method params_choose_new_3.
@Test
public void params_choose_new_3() {
StoreParams p = StoreParamsFactory.decideStoreParams(Location.mem(), true, null, pLoc, pDft);
// New store, pLoc, no pApp, so pLoc is the entire settings.
assertEquals(0, p.getBlockSize().intValue());
assertTrue(StoreParams.sameValues(p, pLoc));
}
Aggregations