Skip to content

Commit

Permalink
fix get model assertion error
Browse files Browse the repository at this point in the history
Signed-off-by: Bhavana Ramaram <[email protected]>
  • Loading branch information
rbhavna committed Jul 11, 2023
1 parent a37a78d commit 9089f31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ public void getModel(String modelId, String[] includes, String[] excludes, Actio
listener.onFailure(e);
}
} else {
listener.onFailure(new OpenSearchStatusException("Failed to find model group", RestStatus.NOT_FOUND));
listener.onFailure(new OpenSearchStatusException("Failed to find model", RestStatus.NOT_FOUND));
}
}, e -> { listener.onFailure(e); }));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ public void testDeployModel_NullGetModelResponse() {
assertFalse(modelManager.isModelRunningOnNode(modelId));
ArgumentCaptor<Exception> exception = ArgumentCaptor.forClass(Exception.class);
verify(listener).onFailure(exception.capture());
assertEquals("Fail to find model", exception.getValue().getMessage());
assertEquals("Failed to find model", exception.getValue().getMessage());
verify(mlStats)
.createCounterStatIfAbsent(
eq(FunctionName.TEXT_EMBEDDING),
Expand All @@ -503,7 +503,7 @@ public void testDeployModel_GetModelResponse_NotExist() {
assertFalse(modelManager.isModelRunningOnNode(modelId));
ArgumentCaptor<Exception> exception = ArgumentCaptor.forClass(Exception.class);
verify(listener).onFailure(exception.capture());
assertEquals("Fail to find model", exception.getValue().getMessage());
assertEquals("Failed to find model", exception.getValue().getMessage());
verify(mlStats)
.createCounterStatIfAbsent(
eq(FunctionName.TEXT_EMBEDDING),
Expand Down

0 comments on commit 9089f31

Please sign in to comment.