Skip to content

Commit

Permalink
Unmute tests
Browse files Browse the repository at this point in the history
  • Loading branch information
prwhelan committed Oct 23, 2024
1 parent c198397 commit 252dbec
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 26 deletions.
12 changes: 0 additions & 12 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,24 +218,12 @@ tests:
- class: org.elasticsearch.xpack.inference.TextEmbeddingCrudIT
method: testPutE5Small_withPlatformSpecificVariant
issue: https://github.com/elastic/elasticsearch/issues/113950
- class: org.elasticsearch.xpack.inference.services.openai.OpenAiServiceTests
method: testInfer_StreamRequest_ErrorResponse
issue: https://github.com/elastic/elasticsearch/issues/114105
- class: org.elasticsearch.xpack.inference.InferenceCrudIT
method: testGet
issue: https://github.com/elastic/elasticsearch/issues/114135
- class: org.elasticsearch.xpack.ilm.ExplainLifecycleIT
method: testStepInfoPreservedOnAutoRetry
issue: https://github.com/elastic/elasticsearch/issues/114220
- class: org.elasticsearch.xpack.inference.services.openai.OpenAiServiceTests
method: testInfer_StreamRequest
issue: https://github.com/elastic/elasticsearch/issues/114232
- class: org.elasticsearch.xpack.inference.services.cohere.CohereServiceTests
method: testInfer_StreamRequest_ErrorResponse
issue: https://github.com/elastic/elasticsearch/issues/114327
- class: org.elasticsearch.xpack.inference.services.cohere.CohereServiceTests
method: testInfer_StreamRequest
issue: https://github.com/elastic/elasticsearch/issues/114385
- class: org.elasticsearch.xpack.inference.InferenceRestIT
method: test {p0=inference/30_semantic_text_inference/Calculates embeddings using the default ELSER 2 endpoint}
issue: https://github.com/elastic/elasticsearch/issues/114412
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.elasticsearch.common.xcontent.ChunkedToXContent;
import org.elasticsearch.common.xcontent.XContentHelper;
import org.elasticsearch.inference.InferenceServiceResults;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.xcontent.XContentFactory;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
Expand All @@ -26,6 +25,7 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Stream;

import static org.elasticsearch.test.ESTestCase.fail;
import static org.elasticsearch.xcontent.ToXContent.EMPTY_PARAMS;
import static org.hamcrest.CoreMatchers.is;

Expand All @@ -47,7 +47,9 @@ public InferenceEventsAssertion hasFinishedStream() {
}

public InferenceEventsAssertion hasNoErrors() {
MatcherAssert.assertThat("Expected no errors from stream.", error, Matchers.nullValue());
if (error != null) {
fail(error, "Expected no errors from stream.");
}
return this;
}

Expand All @@ -66,7 +68,7 @@ public InferenceEventsAssertion hasErrorWithStatusCode(int statusCode) {
}
t = t.getCause();
}
ESTestCase.fail(error, "Expected an underlying ElasticsearchStatusException.");
fail(error, "Expected an underlying ElasticsearchStatusException.");
return this;
}

Expand All @@ -79,7 +81,7 @@ public InferenceEventsAssertion hasErrorContaining(String message) {
}
t = t.getCause();
}
ESTestCase.fail(error, "Expected exception to contain string: " + message);
fail(error, "Expected exception to contain string: " + message);
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ public void testInfer_SendsCompletionRequest() throws IOException {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest() throws Exception {
String responseJson = """
data: {"type": "message_start", "message": {"model": "claude, probably"}}
Expand Down Expand Up @@ -578,7 +577,6 @@ private InferenceServiceResults streamChatCompletion() throws IOException {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest_ErrorResponse() throws Exception {
String responseJson = """
data: {"type": "error", "error": {"type": "request_too_large", "message": "blah"}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,6 @@ public void testInfer_UnauthorisedResponse() throws IOException {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest() throws Exception {
String responseJson = """
data: {\
Expand Down Expand Up @@ -1364,7 +1363,6 @@ private InferenceServiceResults streamChatCompletion() throws IOException, URISy
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest_ErrorResponse() throws Exception {
String responseJson = """
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1425,7 +1425,6 @@ private void testChunkedInfer(AzureOpenAiEmbeddingsModel model) throws IOExcepti
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest() throws Exception {
String responseJson = """
data: {\
Expand Down Expand Up @@ -1484,7 +1483,6 @@ private InferenceServiceResults streamChatCompletion() throws IOException, URISy
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest_ErrorResponse() throws Exception {
String responseJson = """
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1635,7 +1635,6 @@ public void testDefaultSimilarity() {
assertEquals(SimilarityMeasure.DOT_PRODUCT, CohereService.defaultSimilarity());
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest() throws Exception {
String responseJson = """
{"event_type":"text-generation", "text":"hello"}
Expand Down Expand Up @@ -1669,7 +1668,6 @@ private InferenceServiceResults streamChatCompletion() throws IOException {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest_ErrorResponse() throws Exception {
String responseJson = """
{ "event_type":"stream-end", "finish_reason":"ERROR", "response":{ "text": "how dare you" } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,6 @@ public void testInfer_SendsRequest() throws IOException {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest() throws Exception {
String responseJson = """
data: {\
Expand Down Expand Up @@ -1057,7 +1056,6 @@ private InferenceServiceResults streamChatCompletion() throws IOException {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/114385")
public void testInfer_StreamRequest_ErrorResponse() throws Exception {
String responseJson = """
{
Expand Down

0 comments on commit 252dbec

Please sign in to comment.