use of com.yahoo.cloud.config.ClusterListConfig in project vespa by vespa-engine.
the class VisitorSearcherTestCase method testNoClusterParamWhenSeveralClusters.
@Test(expected = IllegalArgumentException.class)
public void testNoClusterParamWhenSeveralClusters() throws Exception {
DocumentSessionFactory factory = new DocumentSessionFactory(docType);
ClusterListConfig.Storage.Builder storageCluster1 = new ClusterListConfig.Storage.Builder().configid("storage/cluster.foo").name("foo");
ClusterListConfig.Storage.Builder storageCluster2 = new ClusterListConfig.Storage.Builder().configid("storage/cluster.bar").name("bar");
ClusterListConfig clusterListCfg = new ClusterListConfig(new ClusterListConfig.Builder().storage(Arrays.asList(storageCluster1, storageCluster2)));
ClusterList clusterList = new ClusterList(clusterListCfg);
VisitSearcher searcher = new VisitSearcher(new FeedContext(new MessagePropertyProcessor(new FeederConfig(new FeederConfig.Builder().timeout(100).route("whatever").retryenabled(true)), new LoadTypeConfig(new LoadTypeConfig.Builder())), factory, docMan, clusterList, new NullFeedMetric()));
searcher.getVisitorParameters(newQuery("visit?visit.selection=id.user=1234"), null);
}
use of com.yahoo.cloud.config.ClusterListConfig in project vespa by vespa-engine.
the class IndexedTest method requireCorrectClusterList.
@Test
public void requireCorrectClusterList() {
VespaModel model = getStreamingVespaModel();
ContentCluster s = model.getContentClusters().get("test");
assertNotNull(s);
assertFalse(s.getSearch().hasIndexedCluster());
ClusterListConfig config = model.getConfig(ClusterListConfig.class, VespaModel.ROOT_CONFIGID);
assertThat(config.storage().size(), is(1));
assertThat(config.storage(0).name(), is("test"));
assertThat(config.storage(0).configid(), is("test"));
}
use of com.yahoo.cloud.config.ClusterListConfig in project vespa by vespa-engine.
the class VisitorSearcherTestCase method create.
public VisitSearcher create() throws Exception {
ClusterListConfig.Storage.Builder storageCluster = new ClusterListConfig.Storage.Builder().configid("storage/cluster.foobar").name("foobar");
ClusterListConfig clusterListCfg = new ClusterListConfig(new ClusterListConfig.Builder().storage(storageCluster));
ClusterList clusterList = new ClusterList(clusterListCfg);
return new VisitSearcher(new FeedContext(new MessagePropertyProcessor(new FeederConfig(new FeederConfig.Builder().timeout(458).route("riksveg18").retryenabled(true)), new LoadTypeConfig(new LoadTypeConfig.Builder())), factory, docMan, clusterList, new NullFeedMetric()));
}
Aggregations