diff --git a/muted-tests.yml b/muted-tests.yml index 41a8da0c63d49..dd0406b6ee40b 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -110,9 +110,6 @@ tests: issue: https://github.com/elastic/elasticsearch/issues/120339 - class: org.elasticsearch.xpack.sql.expression.function.scalar.datetime.DateTimeToCharProcessorTests issue: https://github.com/elastic/elasticsearch/issues/120575 -- class: org.elasticsearch.xpack.inference.DefaultEndPointsIT - method: testMultipleInferencesTriggeringDownloadAndDeploy - issue: https://github.com/elastic/elasticsearch/issues/120668 - class: org.elasticsearch.xpack.test.rest.XPackRestIT method: test {p0=ml/3rd_party_deployment/Test start deployment fails while model download in progress} issue: https://github.com/elastic/elasticsearch/issues/120810 diff --git a/x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/DefaultEndPointsIT.java b/x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/DefaultEndPointsIT.java index fa6f0b3979653..897a23e5ab13a 100644 --- a/x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/DefaultEndPointsIT.java +++ b/x-pack/plugin/inference/qa/inference-service-tests/src/javaRestTest/java/org/elasticsearch/xpack/inference/DefaultEndPointsIT.java @@ -25,7 +25,6 @@ import java.util.concurrent.CountDownLatch; import static org.hamcrest.Matchers.empty; -import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.oneOf; @@ -75,7 +74,7 @@ public void testDefaultModels() throws IOException { putModel("my-model", mockCompletionServiceModelConfig(TaskType.SPARSE_EMBEDDING, "streaming_completion_test_service")); var registeredModels = getMinimalConfigs(); - assertThat(registeredModels.size(), equalTo(1)); + assertThat(registeredModels.size(), is(1)); assertTrue(registeredModels.containsKey("my-model")); assertFalse(registeredModels.containsKey(ElasticsearchInternalService.DEFAULT_E5_ID)); assertFalse(registeredModels.containsKey(ElasticsearchInternalService.DEFAULT_ELSER_ID)); @@ -194,7 +193,14 @@ private static void assertDefaultChunkingSettings(Map modelConfi ); } - public void testMultipleInferencesTriggeringDownloadAndDeploy() throws InterruptedException { + public void testMultipleInferencesTriggeringDownloadAndDeploy() throws InterruptedException, IOException { + var initialEndpointId = "initial-model"; + // Creating an inference endpoint to force the backing indices to be created to reduce the likelihood of the test failing + // because it's trying to interact with the indices while they're being created. + putModel(initialEndpointId, mockCompletionServiceModelConfig(TaskType.SPARSE_EMBEDDING, "streaming_completion_test_service")); + // delete model so it doesn't affect other tests + deleteModel(initialEndpointId); + int numParallelRequests = 4; var latch = new CountDownLatch(numParallelRequests); var errors = new ArrayList();