aboutsummaryrefslogtreecommitdiffstats
path: root/container-search
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2019-01-15 10:24:11 +0100
committerJon Bratseth <bratseth@oath.com>2019-01-15 10:24:11 +0100
commit27e1e811df19e5987c9126a3dadbceef9aa0ab58 (patch)
tree0d3a27e2572bdeccbafa90b90526c3f2440b7cb1 /container-search
parent943a90d07613cc13a52b2b7c561024c949be3741 (diff)
Remove unnecessary warning
Diffstat (limited to 'container-search')
-rw-r--r--container-search/src/test/java/com/yahoo/search/test/QueryTestCase.java11
1 files changed, 11 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 ed80c0bf256..dae6b9f0fb9 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
@@ -308,6 +308,17 @@ public class QueryTestCase {
}
@Test
+ public void testLanguageSubstitution() {
+ QueryProfile profile = new QueryProfile("myProfile");
+ profile.set("myField1", "Language: %{model.language}", null);
+ profile.set("myField2", "Locale: %{locale}", null);
+ Query q = new Query(QueryTestCase.httpEncode("/search?lang=en-us"), profile.compile(null));
+ assertEquals("Language: ENGLISH", q.properties().get("myField1"));
+ q.properties().set("locale", q.getHttpRequest().propertyMap().get("lang"));
+ assertEquals("Locale: en-us", q.properties().get("myField2"));
+ }
+
+ @Test
public void testTimeoutInRequestOverridesQueryProfile() {
QueryProfile profile = new QueryProfile("test");
profile.set("timeout", 318, (QueryProfileRegistry)null);