Skip to content

Commit c76af92

Browse files
committed
fix test compil
1 parent 2766e97 commit c76af92

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

x-pack/plugin/inference/src/internalClusterTest/java/org/elasticsearch/xpack/inference/action/filter/ShardBulkInferenceActionFilterBasicLicenseIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.elasticsearch.xpack.inference.Utils;
2929
import org.elasticsearch.xpack.inference.mock.TestDenseInferenceServiceExtension;
3030
import org.elasticsearch.xpack.inference.mock.TestSparseInferenceServiceExtension;
31+
import org.elasticsearch.xpack.inference.registry.ModelRegistry;
3132
import org.junit.Before;
3233

3334
import java.util.Arrays;
@@ -57,9 +58,10 @@ public static Iterable<Object[]> parameters() {
5758

5859
@Before
5960
public void setup() throws Exception {
60-
Utils.storeSparseModel(client());
61+
ModelRegistry modelRegistry = internalCluster().getCurrentMasterNodeInstance(ModelRegistry.class);
62+
Utils.storeSparseModel(modelRegistry);
6163
Utils.storeDenseModel(
62-
client(),
64+
modelRegistry,
6365
randomIntBetween(1, 100),
6466
// dot product means that we need normalized vectors; it's not worth doing that in this test
6567
randomValueOtherThan(SimilarityMeasure.DOT_PRODUCT, () -> randomFrom(SimilarityMeasure.values())),

0 commit comments

Comments
 (0)