use of com.yahoo.vespa.model.container.docproc.DocumentProcessor in project vespa by vespa-engine.
the class DocprocBuilderTest method testDocprocCluster.
// TODO: re-enable assertions when the appropriate attributes are handled by the builder
@Test
public void testDocprocCluster() {
assertThat(cluster.getName(), is("banan"));
assertThat(cluster.getDocproc().isCompressDocuments(), is(true));
// assertThat(cluster.getContainerDocproc().isPreferLocalNode(), is(true));
// assertThat(cluster.getContainerDocproc().getNumNodesPerClient(), is(2));
List<Container> services = cluster.getContainers();
assertThat(services.size(), is(1));
Container service = services.get(0);
assertThat(service, notNullValue());
Map<String, DocprocChain> chains = new HashMap<>();
for (DocprocChain chain : cluster.getDocprocChains().allChains().allComponents()) {
chains.put(chain.getId().stringValue(), chain);
}
assertThat(chains.size(), is(1));
DocprocChain chain = chains.get("chein");
assertThat(chain.getId().stringValue(), is("chein"));
assertThat(chain.getInnerComponents().size(), is(1));
DocumentProcessor processor = chain.getInnerComponents().iterator().next();
assertThat(processor.getComponentId().stringValue(), is("docproc2"));
}
Aggregations