Search in sources :

Example 1 with Processor

use of com.yahoo.vespa.model.container.processing.Processor in project vespa by vespa-engine.

the class ProcessingChainsTest method testProcessingChainConfiguration.

@Test
public void testProcessingChainConfiguration() {
    ProcessingChain defaultChain = processingChains.allChains().getComponent("default");
    assertEquals("default", defaultChain.getId().stringValue());
    assertEquals(1, defaultChain.getInnerComponents().size());
    Collection<ChainedComponent<?>> outerProcessors = processingChains.getComponentGroup().getComponents();
    assertEquals(1, outerProcessors.size());
    assertEquals("processor1", outerProcessors.iterator().next().getComponentId().toString());
    Collection<Processor> innerProcessors = defaultChain.getInnerComponents();
    assertEquals("processor2", innerProcessors.iterator().next().getComponentId().toString());
}
Also used : Processor(com.yahoo.vespa.model.container.processing.Processor) ProcessingChain(com.yahoo.vespa.model.container.processing.ProcessingChain) ChainedComponent(com.yahoo.vespa.model.container.component.chain.ChainedComponent) Test(org.junit.Test) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest)

Example 2 with Processor

use of com.yahoo.vespa.model.container.processing.Processor in project vespa by vespa-engine.

the class ProcessingChainsTest method require_that_processors_have_correct_class.

@Test
public void require_that_processors_have_correct_class() {
    ChainedComponent<?> processor1 = processingChains.getComponentGroup().getComponents().iterator().next();
    assertEquals("com.yahoo.test.Processor1", processor1.model.bundleInstantiationSpec.classId.stringValue());
    ProcessingChain defaultChain = processingChains.allChains().getComponent("default");
    Processor processor2 = defaultChain.getInnerComponents().iterator().next();
    assertEquals("com.yahoo.test.Processor2", processor2.model.bundleInstantiationSpec.classId.stringValue());
}
Also used : Processor(com.yahoo.vespa.model.container.processing.Processor) ProcessingChain(com.yahoo.vespa.model.container.processing.ProcessingChain) Test(org.junit.Test) DomBuilderTest(com.yahoo.config.model.builder.xml.test.DomBuilderTest)

Aggregations

DomBuilderTest (com.yahoo.config.model.builder.xml.test.DomBuilderTest)2 ProcessingChain (com.yahoo.vespa.model.container.processing.ProcessingChain)2 Processor (com.yahoo.vespa.model.container.processing.Processor)2 Test (org.junit.Test)2 ChainedComponent (com.yahoo.vespa.model.container.component.chain.ChainedComponent)1