Skip to content

Commit 574eaf9

Browse files
Fixing some test failures
1 parent 6342cc3 commit 574eaf9

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/sender/RequestExecutorServiceTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,7 @@ public void testExecute_CallsOnFailure_WhenRequestTimesOut() {
240240

241241
var thrownException = expectThrows(ElasticsearchStatusException.class, () -> listener.actionGet(TIMEOUT));
242242

243-
assertThat(
244-
thrownException.getMessage(),
245-
is(format("Request timed out waiting to be sent after [%s]", TimeValue.timeValueNanos(1)))
246-
);
243+
assertThat(thrownException.getMessage(), is(format("Request timed out after [%s]", TimeValue.timeValueNanos(1))));
247244
assertThat(thrownException.status().getStatus(), is(408));
248245
}
249246

x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/services/elastic/authorization/ElasticInferenceServiceAuthorizationHandlerTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void testGetAuthorization_FailsWhenAnInvalidFieldIsFound() throws IOExcep
9292
is(
9393
"Failed to retrieve the authorization information from the Elastic Inference Service."
9494
+ " Encountered an exception: org.elasticsearch.xcontent.XContentParseException: [4:28] "
95-
+ "[ElasticInferenceServiceAuthResponseEntity] failed to parse field [models]"
95+
+ "[ElasticInferenceServiceAuthorizationResponseEntity] failed to parse field [models]"
9696
)
9797
);
9898
}
@@ -118,8 +118,8 @@ public void testGetAuthorization_ReturnsAValidResponse() throws IOException {
118118
{
119119
"models": [
120120
{
121-
"model-name": "model-a",
122-
"task-types": ["embedding/text/sparse", "chat/completion"]
121+
"model_name": "model-a",
122+
"task_types": ["embedding/text/sparse", "chat/completion"]
123123
}
124124
]
125125
}

0 commit comments

Comments
 (0)