Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.concurrent.CountDownLatch;

import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.oneOf;
Expand Down Expand Up @@ -75,7 +75,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(), greaterThanOrEqualTo(1));
assertTrue(registeredModels.containsKey("my-model"));
assertFalse(registeredModels.containsKey(ElasticsearchInternalService.DEFAULT_E5_ID));
assertFalse(registeredModels.containsKey(ElasticsearchInternalService.DEFAULT_ELSER_ID));
Expand Down Expand Up @@ -194,7 +194,11 @@ private static void assertDefaultChunkingSettings(Map<String, Object> modelConfi
);
}

public void testMultipleInferencesTriggeringDownloadAndDeploy() throws InterruptedException {
public void testMultipleInferencesTriggeringDownloadAndDeploy() throws InterruptedException, IOException {
// 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("initial-model", mockCompletionServiceModelConfig(TaskType.SPARSE_EMBEDDING, "streaming_completion_test_service"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you delete this endpoint right after creating it, will the backing indices still exist? If so, it would be cleaner to create then delete the endpoint so that you don't need to account for an extra endpoint hanging around in other tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I'll give that a shot 👍


int numParallelRequests = 4;
var latch = new CountDownLatch(numParallelRequests);
var errors = new ArrayList<Exception>();
Expand Down