Search in sources :

Example 1 with SharedBackend

use of org.apache.jackrabbit.oak.spi.blob.SharedBackend in project jackrabbit-oak by apache.

the class DataStoreServiceTest method configCachingFileDataStore.

/**
     *
     * Test {@link CachingFileDataStore} is returned when cacheSize > 0 by default.
     */
@Test
public void configCachingFileDataStore() throws Exception {
    String nasPath = folder.getRoot().getAbsolutePath() + "/NASPath";
    String cachePath = folder.getRoot().getAbsolutePath() + "/cachePath";
    DataStore ds = getAssertCachingFileDataStore(nasPath, cachePath);
    CachingFileDataStore cds = (CachingFileDataStore) ds;
    SharedBackend backend = cds.getBackend();
    Properties props = (Properties) getField(backend);
    assertEquals("path not equal", nasPath, props.getProperty(FSBackend.FS_BACKEND_PATH));
}
Also used : SharedBackend(org.apache.jackrabbit.oak.spi.blob.SharedBackend) DataStore(org.apache.jackrabbit.core.data.DataStore) FileDataStore(org.apache.jackrabbit.core.data.FileDataStore) Properties(java.util.Properties) Test(org.junit.Test)

Aggregations

Properties (java.util.Properties)1 DataStore (org.apache.jackrabbit.core.data.DataStore)1 FileDataStore (org.apache.jackrabbit.core.data.FileDataStore)1 SharedBackend (org.apache.jackrabbit.oak.spi.blob.SharedBackend)1 Test (org.junit.Test)1