diff options
author | gjoranv <gv@verizonmedia.com> | 2020-05-19 22:35:20 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2020-05-22 14:33:47 +0200 |
commit | ab4d0f83bfee18cfdf9b7ae41dd2e2ac7caaf546 (patch) | |
tree | 23f7df14b7dbb7bb45c236bb00b87be37abd0cf5 /config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java | |
parent | bdfc429cda06bb6f285e94f9ac5752bc86b7df57 (diff) |
Add CompiledQueryProfileRegistry component for injection.
Diffstat (limited to 'config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java')
-rw-r--r-- | config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java index 47f37a75fd0..572d12539aa 100644 --- a/config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java +++ b/config-model/src/test/java/com/yahoo/vespa/model/container/xml/SearchBuilderTest.java @@ -1,9 +1,11 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.model.container.xml; +import com.yahoo.component.ComponentId; import com.yahoo.config.model.builder.xml.test.DomBuilderTest; import com.yahoo.container.core.ChainsConfig; import com.yahoo.container.jdisc.JdiscBindingsConfig; +import com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry; import com.yahoo.vespa.model.VespaModel; import com.yahoo.vespa.model.container.ContainerCluster; import com.yahoo.vespa.model.container.ApplicationContainerCluster; @@ -16,6 +18,7 @@ import org.w3c.dom.Element; import static com.yahoo.config.model.api.container.ContainerServiceType.QRSERVER; import static com.yahoo.test.Matchers.hasItemWithMethod; +import static com.yahoo.vespa.model.container.search.ContainerSearch.QUERY_PROFILES_REGISTRY_CLASS; import static com.yahoo.vespa.model.container.xml.ContainerModelBuilder.SEARCH_HANDLER_BINDING; import static com.yahoo.vespa.model.container.xml.ContainerModelBuilder.SEARCH_HANDLER_CLASS; import static org.hamcrest.CoreMatchers.is; @@ -127,6 +130,14 @@ public class SearchBuilderTest extends ContainerModelBuilderTestBase { assertThat(chainsConfig().chains(), hasItemWithMethod("vespa", "id")); } + @Test + public void query_profiles_registry_component_is_added() { + createClusterWithOnlyDefaultChains(); + ApplicationContainerCluster cluster = (ApplicationContainerCluster)root.getChildren().get("default"); + var queryProfilesRegistryId = ComponentId.fromString(QUERY_PROFILES_REGISTRY_CLASS); + assertTrue(cluster.getComponentsMap().containsKey(queryProfilesRegistryId)); + } + private void createClusterWithOnlyDefaultChains() { Element containerElem = DomBuilderTest.parse( "<container id='default' version='1.0'>", |