Search in sources :

Example 1 with Components

use of com.yahoo.container.core.ChainsConfig.Components in project vespa by vespa-engine.

the class ChainsModelBuilderTest method chainsModel.

private ChainsModel chainsModel() {
    ChainsConfig.Builder builder = new ChainsConfig.Builder().components(new Components.Builder().id("componentA")).components(new Components.Builder().id("componentB")).chains(new Chains.Builder().id("chain1").components("componentA").components("componentB")).chains(new Chains.Builder().id("inheritsChain1").inherits("chain1").excludes("componentA"));
    ChainsConfig config = new ChainsConfig(builder);
    ChainsModel model = ChainsModelBuilder.buildFromConfig(config);
    model.validate();
    return model;
}
Also used : Components(com.yahoo.container.core.ChainsConfig.Components) Chains(com.yahoo.container.core.ChainsConfig.Chains) ChainsConfig(com.yahoo.container.core.ChainsConfig)

Example 2 with Components

use of com.yahoo.container.core.ChainsConfig.Components in project vespa by vespa-engine.

the class DomSearchChainsBuilderTest method checkInnerSearcherIdIsNestedInSearchChainId.

private void checkInnerSearcherIdIsNestedInSearchChainId(ChainsConfig config, String partOfSearcherName, String searchChainName) {
    Components searcher = getSearcherConfig(config.components(), partOfSearcherName);
    ComponentId searcherId = ComponentId.fromString(searcher.id());
    assertThat(searcherId.getNamespace(), is(getSearchChain(searchChainName).getComponentId()));
    Chains searchChain = getSearchChainConfig(config.chains(), searchChainName);
    assertThat(ComponentId.fromString(searchChain.components(0)), is(searcherId));
}
Also used : Components(com.yahoo.container.core.ChainsConfig.Components) Chains(com.yahoo.container.core.ChainsConfig.Chains) ComponentId(com.yahoo.component.ComponentId)

Aggregations

Chains (com.yahoo.container.core.ChainsConfig.Chains)2 Components (com.yahoo.container.core.ChainsConfig.Components)2 ComponentId (com.yahoo.component.ComponentId)1 ChainsConfig (com.yahoo.container.core.ChainsConfig)1