diff options
author | gjoranv <gv@verizonmedia.com> | 2022-01-31 02:21:02 +0100 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2022-01-31 02:21:02 +0100 |
commit | f62a05ea11eeef5e6c7e1605bcb9968a4325e7d8 (patch) | |
tree | 215924f8b1ee630f5f87d6794ed65a27eca719ef /container-search/src/test/java/com/yahoo/search | |
parent | 7ef996c748334231a6a1c3ace62ca8e39aca580f (diff) |
Stop using deprecated ConfigGetter method
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search')
2 files changed, 11 insertions, 6 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java b/container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java index 14fdd047391..9a760bfb0cb 100644 --- a/container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/searchers/ValidateNearestNeighborTestCase.java @@ -2,6 +2,7 @@ package com.yahoo.search.searchers; import com.yahoo.config.subscription.ConfigGetter; +import com.yahoo.config.subscription.FileSource; import com.yahoo.config.subscription.RawSource; import com.yahoo.prelude.IndexFacts; import com.yahoo.prelude.IndexModel; @@ -18,7 +19,11 @@ import com.yahoo.tensor.Tensor; import com.yahoo.tensor.TensorType; import com.yahoo.vespa.config.search.AttributesConfig; +import com.yahoo.vespa.config.search.RankProfilesConfig; import org.junit.Test; + +import java.io.File; + import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; @@ -32,8 +37,8 @@ public class ValidateNearestNeighborTestCase { public ValidateNearestNeighborTestCase() { searcher = new ValidateNearestNeighborSearcher( ConfigGetter.getConfig(AttributesConfig.class, - "raw:", - new RawSource("attribute[5]\n" + + "raw:" + + "attribute[5]\n" + "attribute[0].name simple\n" + "attribute[0].datatype INT32\n" + "attribute[1].name dvector\n" + @@ -57,7 +62,7 @@ public class ValidateNearestNeighborTestCase { "attribute[7].name threetypes\n" + "attribute[7].datatype TENSOR\n" + "attribute[7].tensortype tensor(x{})\n" - ))); + )); } private static TensorType tt_dense_dvector_42 = TensorType.fromSpec("tensor(x[42])"); diff --git a/container-search/src/test/java/com/yahoo/search/searchers/test/ValidateMatchPhaseSearcherTestCase.java b/container-search/src/test/java/com/yahoo/search/searchers/test/ValidateMatchPhaseSearcherTestCase.java index 86ffb1f9830..01e360858c1 100644 --- a/container-search/src/test/java/com/yahoo/search/searchers/test/ValidateMatchPhaseSearcherTestCase.java +++ b/container-search/src/test/java/com/yahoo/search/searchers/test/ValidateMatchPhaseSearcherTestCase.java @@ -27,8 +27,8 @@ public class ValidateMatchPhaseSearcherTestCase { public ValidateMatchPhaseSearcherTestCase() { searcher = new ValidateMatchPhaseSearcher( ConfigGetter.getConfig(AttributesConfig.class, - "raw:", - new RawSource("attribute[4]\n" + + "raw:" + + "attribute[4]\n" + "attribute[0].name ok\n" + "attribute[0].datatype INT32\n" + "attribute[0].collectiontype SINGLE\n" + @@ -45,7 +45,7 @@ public class ValidateMatchPhaseSearcherTestCase { "attribute[3].datatype INT32\n" + "attribute[3].collectiontype ARRAY\n" + "attribute[3].fastsearch true" - ))); + )); } private static String getErrorMatch(String attribute) { |