use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class CugConfigurationWithMountsTest method testMountBelowUnsupportedPath.
@Test
public void testMountBelowUnsupportedPath() {
MountInfoProvider mip = Mounts.newBuilder().mount("mnt", AbstractCugTest.UNSUPPORTED_PATH + "/mount").build();
CugConfiguration configuration = createConfiguration(mip);
assertArrayEquals(AbstractCugTest.SUPPORTED_PATHS, configuration.getParameters().getConfigValue(CugConstants.PARAM_CUG_SUPPORTED_PATHS, new String[0]));
}
use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class CugConfigurationWithMountsTest method testMountAtCugSupportedPath.
@Test(expected = IllegalStateException.class)
public void testMountAtCugSupportedPath() {
MountInfoProvider mip = Mounts.newBuilder().mount("mnt", AbstractCugTest.SUPPORTED_PATH).build();
CugConfiguration configuration = createConfiguration(mip);
}
use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class CugConfigurationWithMountsTest method testMountAtUnsupportedPath.
@Test
public void testMountAtUnsupportedPath() {
MountInfoProvider mip = Mounts.newBuilder().mount("mnt", AbstractCugTest.UNSUPPORTED_PATH).build();
CugConfiguration configuration = createConfiguration(mip);
assertArrayEquals(AbstractCugTest.SUPPORTED_PATHS, configuration.getParameters().getConfigValue(CugConstants.PARAM_CUG_SUPPORTED_PATHS, new String[0]));
}
use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class HybridIndexTest method prepareLuceneIndexer.
private void prepareLuceneIndexer(File workDir) {
try {
indexCopierDir = createTemporaryFolderIn(workDir);
copier = new IndexCopier(executorService, indexCopierDir, true);
} catch (IOException e) {
throw new RuntimeException(e);
}
nrtIndexFactory = new NRTIndexFactory(copier, Clock.SIMPLE, TimeUnit.MILLISECONDS.toSeconds(refreshDeltaMillis), StatisticsProvider.NOOP);
MountInfoProvider mip = Mounts.defaultMountInfoProvider();
LuceneIndexReaderFactory indexReaderFactory = new DefaultIndexReaderFactory(mip, copier);
IndexTracker tracker = new IndexTracker(indexReaderFactory, nrtIndexFactory);
luceneIndexProvider = new LuceneIndexProvider(tracker);
luceneEditorProvider = new LuceneIndexEditorProvider(copier, tracker, //extractedTextCache
null, //augmentorFactory
null, mip);
queue = new DocumentQueue(queueSize, tracker, executorService, statsProvider);
localIndexObserver = new LocalIndexObserver(queue, statsProvider);
luceneEditorProvider.setIndexingQueue(queue);
}
use of org.apache.jackrabbit.oak.spi.mount.MountInfoProvider in project jackrabbit-oak by apache.
the class MultiplexersTest method customNodeName.
@Test
public void customNodeName() throws Exception {
MountInfoProvider mip = Mounts.newBuilder().mount("foo", "/a", "/b").build();
Mount m = mip.getMountByName("foo");
assertEquals(":index", getIndexNodeName(mip, "/foo", INDEX_CONTENT_NODE_NAME));
assertEquals(":index", getNodeForMount(mip.getDefaultMount(), INDEX_CONTENT_NODE_NAME));
assertEquals(":" + m.getPathFragmentName() + "-index", getIndexNodeName(mip, "/a", INDEX_CONTENT_NODE_NAME));
assertEquals(":" + m.getPathFragmentName() + "-index", getNodeForMount(m, INDEX_CONTENT_NODE_NAME));
}
Aggregations