diff options
author | Bjørn Christian Seime <bjorn.christian@seime.no> | 2022-12-02 14:52:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 14:52:26 +0100 |
commit | 81b884ac555806ae2f0a75773accfd8fe27ecbe1 (patch) | |
tree | 0f92b9ef73a90854cacc96796562d3f21ff1cff6 /config-model/src/test/java/com/yahoo/schema/processing | |
parent | c956ac4cb73b329243072aabe35f0da508c02d0f (diff) |
Revert "Let list handling catch up with Java 17"
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/processing')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/processing/RankProfileSearchFixture.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/RankProfileSearchFixture.java b/config-model/src/test/java/com/yahoo/schema/processing/RankProfileSearchFixture.java index 58c514bdda8..15fe8250b71 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/RankProfileSearchFixture.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/RankProfileSearchFixture.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.schema.processing; +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; @@ -36,10 +37,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; */ class RankProfileSearchFixture { - private final List<MlModelImporter> importers = List.of(new TensorFlowImporter(), - new OnnxImporter(), - new LightGBMImporter(), - new XGBoostImporter()); + private final ImmutableList<MlModelImporter> importers = ImmutableList.of(new TensorFlowImporter(), + new OnnxImporter(), + new LightGBMImporter(), + new XGBoostImporter()); private final RankProfileRegistry rankProfileRegistry = new RankProfileRegistry(); private final QueryProfileRegistry queryProfileRegistry; private final Schema schema; @@ -50,6 +51,10 @@ class RankProfileSearchFixture { return rankProfileRegistry; } + public QueryProfileRegistry getQueryProfileRegistry() { + return queryProfileRegistry; + } + RankProfileSearchFixture(String rankProfiles) throws ParseException { this(MockApplicationPackage.createEmpty(), new QueryProfileRegistry(), rankProfiles); } @@ -108,6 +113,11 @@ class RankProfileSearchFixture { return compiled; } + /** Returns the given uncompiled profile */ + public RankProfile rankProfile(String rankProfile) { + return rankProfileRegistry.get(schema, rankProfile); + } + /** Returns the given compiled profile, or null if not compiled yet or not present at all */ public RankProfile compiledRankProfile(String rankProfile) { return compiledRankProfiles.get(rankProfile); |