summaryrefslogtreecommitdiffstats
path: root/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-08-16 22:00:00 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2021-08-16 22:04:10 +0200
commitb2d406adae56331b5bd226e25f30f07d5b8614c8 (patch)
tree302ca67760548622836a6ef1248bfba7db1f8a42 /config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java
parent249377274b11826daffe0ae8c2bf3424e758dadb (diff)
Wire in the FileRegistry explicit and separately. Not via FileDistributor.
Only wireing in, no semantic changes.
Diffstat (limited to 'config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java')
-rw-r--r--config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java
index 56cc87cadc4..010b33597f3 100644
--- a/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java
+++ b/config-model/src/test/java/com/yahoo/searchdefinition/processing/RankProfileSearchFixture.java
@@ -5,6 +5,7 @@ import com.google.common.collect.ImmutableList;
import com.yahoo.config.application.api.ApplicationPackage;
import ai.vespa.rankingexpression.importer.configmodelview.MlModelImporter;
import com.yahoo.config.model.application.provider.BaseDeployLogger;
+import com.yahoo.config.model.application.provider.MockFileRegistry;
import com.yahoo.config.model.deploy.TestProperties;
import com.yahoo.config.model.test.MockApplicationPackage;
import com.yahoo.path.Path;
@@ -38,10 +39,10 @@ class RankProfileSearchFixture {
new OnnxImporter(),
new LightGBMImporter(),
new XGBoostImporter());
- private RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
+ private final RankProfileRegistry rankProfileRegistry = new RankProfileRegistry();
private final QueryProfileRegistry queryProfileRegistry;
- private Search search;
- private Map<String, RankProfile> compiledRankProfiles = new HashMap<>();
+ private final Search search;
+ private final Map<String, RankProfile> compiledRankProfiles = new HashMap<>();
public RankProfileRegistry getRankProfileRegistry() {
return rankProfileRegistry;
@@ -64,7 +65,7 @@ class RankProfileSearchFixture {
String rankProfiles, String constant, String field)
throws ParseException {
this.queryProfileRegistry = queryProfileRegistry;
- SearchBuilder builder = new SearchBuilder(applicationpackage, new BaseDeployLogger(), new TestProperties(), rankProfileRegistry, queryProfileRegistry);
+ SearchBuilder builder = new SearchBuilder(applicationpackage, new MockFileRegistry(), new BaseDeployLogger(), new TestProperties(), rankProfileRegistry, queryProfileRegistry);
String sdContent = "search test {\n" +
" " + (constant != null ? constant : "") + "\n" +
" document test {\n" +