diff --git a/plugin/src/test/java/org/opensearch/ml/rest/RestBedRockInferenceIT.java b/plugin/src/test/java/org/opensearch/ml/rest/RestBedRockInferenceIT.java index 9ee0de4d7b..2abe31b932 100644 --- a/plugin/src/test/java/org/opensearch/ml/rest/RestBedRockInferenceIT.java +++ b/plugin/src/test/java/org/opensearch/ml/rest/RestBedRockInferenceIT.java @@ -234,7 +234,7 @@ public void test_bedrock_multimodal_model_empty_imageInput_null_textInput() thro MLInput mlInput = MLInput.builder().inputDataset(inputDataSet).algorithm(FunctionName.TEXT_EMBEDDING).build(); Map inferenceResult = predictTextEmbeddingModel(modelId, mlInput); assertTrue(errorMsg, inferenceResult.containsKey("status")); - assertEquals(errorMsg, 400, Integer.parseInt(String.valueOf(inferenceResult.get("status")))); + assertTrue(errorMsg, String.valueOf(inferenceResult.get("status")).contains("400")); assertTrue(errorMsg, inferenceResult.containsKey("error")); assertTrue(errorMsg, inferenceResult.get("error") instanceof Map); assertEquals(errorMsg, "illegal_argument_exception", ((Map) inferenceResult.get("error")).get("type"));