aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-05-31 23:32:02 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:23 +0200
commit1463c41b72fb46fa3bd57be965b0d0681749944d (patch)
tree9f98272202c5405476e548e88805224c804dd668 /config-model/src/test/java
parentd8c94dd62a910e8f66bbe341fa96eef6bb3f1121 (diff)
Remove on Vespa 8
Diffstat (limited to 'config-model/src/test/java')
-rw-r--r--config-model/src/test/java/com/yahoo/schema/derived/NearestNeighborTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/schema/derived/NeuralNetTestCase.java4
-rw-r--r--config-model/src/test/java/com/yahoo/vespa/model/container/search/test/QueryProfilesTestCase.java6
3 files changed, 3 insertions, 11 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/derived/NearestNeighborTestCase.java b/config-model/src/test/java/com/yahoo/schema/derived/NearestNeighborTestCase.java
index baee7bec2a2..2f3ad7cfc69 100644
--- a/config-model/src/test/java/com/yahoo/schema/derived/NearestNeighborTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/derived/NearestNeighborTestCase.java
@@ -4,7 +4,6 @@ package com.yahoo.schema.derived;
import com.yahoo.component.ComponentId;
import com.yahoo.search.Query;
import com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry;
-import com.yahoo.search.query.profile.config.QueryProfileConfigurer;
import com.yahoo.schema.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
import org.junit.Test;
@@ -22,8 +21,7 @@ public class NearestNeighborTestCase extends AbstractExportingTestCase {
ComponentId.resetGlobalCountersForTests();
DerivedConfiguration c = assertCorrectDeriving("nearestneighbor");
- CompiledQueryProfileRegistry queryProfiles =
- QueryProfileConfigurer.createFromConfig(new QueryProfiles(c.getQueryProfiles(), (level, message) -> {}).getConfig()).compile();
+ CompiledQueryProfileRegistry queryProfiles = CompiledQueryProfileRegistry.fromConfig(new QueryProfiles(c.getQueryProfiles(), (level, message) -> {}).getConfig());
Query q = new Query("?ranking.features.query(q_vec)=[1,2,3,4,5,6]", // length is 6, not 5
queryProfiles.getComponent("default"));
fail("This should fail when q_vec is parsed as a tensor");
diff --git a/config-model/src/test/java/com/yahoo/schema/derived/NeuralNetTestCase.java b/config-model/src/test/java/com/yahoo/schema/derived/NeuralNetTestCase.java
index 6e584099331..56248c02a51 100644
--- a/config-model/src/test/java/com/yahoo/schema/derived/NeuralNetTestCase.java
+++ b/config-model/src/test/java/com/yahoo/schema/derived/NeuralNetTestCase.java
@@ -4,7 +4,6 @@ package com.yahoo.schema.derived;
import com.yahoo.search.Query;
import com.yahoo.search.query.profile.compiled.CompiledQueryProfile;
import com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry;
-import com.yahoo.search.query.profile.config.QueryProfileConfigurer;
import com.yahoo.schema.parser.ParseException;
import com.yahoo.vespa.model.container.search.QueryProfiles;
import org.junit.Test;
@@ -22,8 +21,7 @@ public class NeuralNetTestCase extends AbstractExportingTestCase {
ComponentId.resetGlobalCountersForTests();
DerivedConfiguration c = assertCorrectDeriving("neuralnet");
// Verify that query profiles end up correct when passed through the same intermediate forms as a full system
- CompiledQueryProfileRegistry queryProfiles =
- QueryProfileConfigurer.createFromConfig(new QueryProfiles(c.getQueryProfiles(), (level, message) -> {}).getConfig()).compile();
+ CompiledQueryProfileRegistry queryProfiles = CompiledQueryProfileRegistry.fromConfig(new QueryProfiles(c.getQueryProfiles(), (level, message) -> {}).getConfig());
assertNeuralNetQuery(c, queryProfiles.getComponent("default"));
}
diff --git a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/QueryProfilesTestCase.java b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/QueryProfilesTestCase.java
index e73eb905566..03641e95f84 100644
--- a/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/QueryProfilesTestCase.java
+++ b/config-model/src/test/java/com/yahoo/vespa/model/container/search/test/QueryProfilesTestCase.java
@@ -34,7 +34,7 @@ import static org.junit.Assert.assertTrue;
*/
public class QueryProfilesTestCase {
- private final static String root="src/test/java/com/yahoo/vespa/model/container/search/test/";
+ private final static String root = "src/test/java/com/yahoo/vespa/model/container/search/test/";
@Test
public void testVariantReference() {
@@ -212,10 +212,6 @@ public class QueryProfilesTestCase {
protected void assertConfig(String correctFileName, QueryProfileRegistry check) throws IOException {
assertSerializedConfigFileEquals(root + "/" + correctFileName,
com.yahoo.text.StringUtilities.implodeMultiline(com.yahoo.config.ConfigInstance.serialize(new QueryProfiles(check, new SilentDeployLogger()).getConfig())));
-
- // Also assert that the correct config config can actually be read as a config source
- QueryProfileConfigurer configurer = new QueryProfileConfigurer("file:" + root + "empty.cfg");
- configurer.shutdown();
}
private static class SilentDeployLogger implements DeployLogger {