Skip to content

Commit 39299d5

Browse files
committed
fix another test
1 parent ec16126 commit 39299d5

File tree

1 file changed

+4
-2
lines changed
  • x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration

1 file changed

+4
-2
lines changed

x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/PyTorchModelIT.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,8 +527,9 @@ public void testTruncation() throws IOException {
527527
startDeployment(modelId, AllocationStatus.State.FULLY_ALLOCATED.toString());
528528

529529
String input = "once twice thrice";
530+
var e = expectThrows(ResponseException.class, () -> EntityUtils.toString(infer("once twice thrice", modelId).getEntity()));
530531
assertThat(
531-
EntityUtils.toString(infer("once twice thrice", modelId).getEntity()),
532+
e.getMessage(),
532533
containsString("Input too large. The tokenized input length [3] exceeds the maximum sequence length [2]")
533534
);
534535

@@ -637,7 +638,8 @@ public void testPipelineWithBadProcessor() throws IOException {
637638
""";
638639

639640
response = EntityUtils.toString(client().performRequest(simulateRequest(source)).getEntity());
640-
assertThat(response, containsString("warning"));
641+
assertThat(response, containsString("no value could be found for input field [input]"));
642+
assertThat(response, containsString("status_exception"));
641643
}
642644

643645
public void testDeleteModelWithDeploymentUsedByIngestProcessor() throws IOException {

0 commit comments

Comments
 (0)