Skip to content

Commit 43fac00

Browse files
authored
[8.x] CsvTestsDataLoader::deleteInferenceEndpoint should use Delete Inference API with task-type (#115832)
This commit updates CsvTestsDataLoader::deleteInferenceEndpoint to use the form of the Delete Inference API that accepts a task type. The test infrastructure attempts to delete the inference endpoint with a request of the form DELETE /_inference/<inference_id>. This form was introduced in 8.13 (see #104483). Previously, the task type was the only supported form, e.g. DELETE /_inference/<task_type>/<inference_id>. Since the task-type form is supported on both recent and less recent Elasticsearch versions, then it's probably most straightforward to just use that form in the 8.x branch. Additional, this commit unmutes the org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT test suite, since this fix allows the suite to complete successfully. closes #115315
1 parent 232d9fb commit 43fac00

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,6 @@ tests:
321321
- class: org.elasticsearch.xpack.inference.TextEmbeddingCrudIT
322322
method: testPutE5Small_withPlatformSpecificVariant
323323
issue: https://github.com/elastic/elasticsearch/issues/113950
324-
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
325-
issue: https://github.com/elastic/elasticsearch/issues/115315
326324
- class: org.elasticsearch.upgrades.UpgradeClusterClientYamlTestSuiteIT
327325
method: test {p0=mixed_cluster/80_transform_jobs_crud/Test GET, start, and stop old cluster batch transforms}
328326
issue: https://github.com/elastic/elasticsearch/issues/115319

x-pack/plugin/esql/qa/testFixtures/src/main/java/org/elasticsearch/xpack/esql/CsvTestsDataLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public static void createInferenceEndpoint(RestClient client) throws IOException
272272

273273
public static void deleteInferenceEndpoint(RestClient client) throws IOException {
274274
try {
275-
client.performRequest(new Request("DELETE", "_inference/test_sparse_inference"));
275+
client.performRequest(new Request("DELETE", "_inference/sparse_embedding/test_sparse_inference"));
276276
} catch (ResponseException e) {
277277
// 404 here means the endpoint was not created
278278
if (e.getResponse().getStatusLine().getStatusCode() != 404) {

0 commit comments

Comments
 (0)