Skip to content

Commit

Permalink
[ML] Mute tests using mock web server for streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
prwhelan committed Oct 10, 2024
1 parent 7dd4c5c commit 0f16c22
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ 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 @@ -577,6 +578,7 @@ 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,6 +1308,7 @@ 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 @@ -1363,6 +1364,7 @@ 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,6 +1425,7 @@ 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 @@ -1483,6 +1484,7 @@ 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,6 +1635,7 @@ 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 @@ -1668,6 +1669,7 @@ 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,6 +1007,7 @@ 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 @@ -1056,6 +1057,7 @@ 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 0f16c22

Please sign in to comment.