Skip to content

Commit a0e939b

Browse files
authored
Update TestSparseInferenceServiceExtension to not support text embeddings (elastic#126618) (elastic#126630)
1 parent 0783cd1 commit a0e939b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/InferenceGetServicesIT.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void testGetServicesWithoutTaskType() throws IOException {
6565
@SuppressWarnings("unchecked")
6666
public void testGetServicesWithTextEmbeddingTaskType() throws IOException {
6767
List<Object> services = getServices(TaskType.TEXT_EMBEDDING);
68-
assertThat(services.size(), equalTo(16));
68+
assertThat(services.size(), equalTo(15));
6969

7070
String[] providers = new String[services.size()];
7171
for (int i = 0; i < services.size(); i++) {
@@ -87,7 +87,6 @@ public void testGetServicesWithTextEmbeddingTaskType() throws IOException {
8787
"jinaai",
8888
"mistral",
8989
"openai",
90-
"test_service",
9190
"text_embedding_test_service",
9291
"voyageai",
9392
"watsonxai"

x-pack/plugin/inference/qa/test-service-plugin/src/main/java/org/elasticsearch/xpack/inference/mock/TestSparseInferenceServiceExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public TestSparseModel(String inferenceEntityId, TestServiceSettings serviceSett
6363
public static class TestInferenceService extends AbstractTestInferenceService {
6464
public static final String NAME = "test_service";
6565

66-
private static final EnumSet<TaskType> supportedTaskTypes = EnumSet.of(TaskType.SPARSE_EMBEDDING, TaskType.TEXT_EMBEDDING);
66+
private static final EnumSet<TaskType> supportedTaskTypes = EnumSet.of(TaskType.SPARSE_EMBEDDING);
6767

6868
public TestInferenceService(InferenceServiceExtension.InferenceServiceFactoryContext context) {}
6969

0 commit comments

Comments
 (0)