Skip to content

Commit 2730017

Browse files
committed
Fix tests
1 parent 6a3d916 commit 2730017

File tree

1 file changed

+5
-16
lines changed

1 file changed

+5
-16
lines changed

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/ElasticInferenceServiceTests.java

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,22 +114,6 @@ public void testParseRequestConfig_CreatesASparseEmbeddingsModel() throws IOExce
114114
}
115115
}
116116

117-
public void testParseRequestConfig_ThrowsUnsupportedModelType() throws IOException {
118-
try (var service = createServiceWithMockSender()) {
119-
var failureListener = getModelListenerForException(
120-
ElasticsearchStatusException.class,
121-
"The [elastic] service does not support task type [completion]"
122-
);
123-
124-
service.parseRequestConfig(
125-
"id",
126-
TaskType.COMPLETION,
127-
getRequestConfigMap(Map.of(ServiceFields.MODEL_ID, ElserModels.ELSER_V2_MODEL), Map.of(), Map.of()),
128-
failureListener
129-
);
130-
}
131-
}
132-
133117
public void testParseRequestConfig_ThrowsWhenAnExtraKeyExistsInConfig() throws IOException {
134118
try (var service = createServiceWithMockSender()) {
135119
var config = getRequestConfigMap(Map.of(ServiceFields.MODEL_ID, ElserModels.ELSER_V2_MODEL), Map.of(), Map.of());
@@ -501,7 +485,12 @@ public void testGetConfiguration() throws Exception {
501485
{
502486
"task_type": "sparse_embedding",
503487
"configuration": {}
488+
},
489+
{
490+
"task_type": "completion",
491+
"configuration": {}
504492
}
493+
505494
],
506495
"configuration": {
507496
"rate_limit.requests_per_minute": {

0 commit comments

Comments
 (0)