summaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-10-31 14:49:22 +0100
committerJon Bratseth <bratseth@verizonmedia.com>2019-10-31 14:49:22 +0100
commit30098a14fef8a2f2e19c922154a5d5fa47509755 (patch)
treeec890d31d9c0f6190984598389e1e6cdc56dc088 /container-search
parentbb100487937c11294daf1c5112e616a76b276594 (diff)
Nonfunctional changes only
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java b/container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java
index 8c6c4e31808..84565472820 100644
--- a/container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java
@@ -312,6 +312,16 @@ public class QueryTestCase {
}
@Test
+ public void testQueryProfileSourceAccess() {
+ QueryProfile profile = new QueryProfile("myProfile");
+ profile.set("myField", "Profile: %{queryProfile}", null);
+ Query query = new Query(QueryTestCase.httpEncode("/search?queryProfile=myProfile"), profile.compile(null));
+
+ String source = query.properties().getInstance(com.yahoo.search.query.profile.QueryProfileProperties.class).getQueryProfile().listValuesWithSources(new CompoundName(""), query.getHttpRequest().propertyMap(), query.properties()).get("myField").source();
+ assertEquals("myProfile", source);
+ }
+
+ @Test
public void testBooleanParameter() {
QueryProfile profile = new QueryProfile("myProfile");
Query query = new Query("/?query=something&ranking.softtimeout.enable=false", profile.compile(null));