Skip to content

Commit

Permalink
fix failed ut from PR 1472 (opensearch-project#1479) (opensearch-proj…
Browse files Browse the repository at this point in the history
…ect#1510)

* fix failed ut from PR 1472

Signed-off-by: Yaliang Wu <[email protected]>

* exclude class for low coverage

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit da5d829)

Co-authored-by: Yaliang Wu <[email protected]>
  • Loading branch information
2 people authored and rbhavna committed Nov 16, 2023
1 parent 3eddabc commit 1ad1091
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ List<String> jacocoExclusions = [
'org.opensearch.ml.action.deploy.TransportDeployModelAction',
'org.opensearch.ml.action.deploy.TransportDeployModelOnNodeAction',
'org.opensearch.ml.action.prediction.TransportPredictionTaskAction',
'org.opensearch.ml.action.prediction.TransportPredictionTaskAction.1',
'org.opensearch.ml.action.tasks.GetTaskTransportAction',
'org.opensearch.ml.action.tasks.SearchTaskTransportAction',
'org.opensearch.ml.model.MLModelManager',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@ public void setModelInfo(String modelId, MLModel mlModel) {
}

public MLModel getModelInfo(String modelId) {
MLModelCache mlModelCache = getExistingModelCache(modelId);
MLModelCache mlModelCache = modelCaches.get(modelId);
if (mlModelCache == null) {
return null;
}
return mlModelCache.getCachedModelInfo();
}

Expand Down

0 comments on commit 1ad1091

Please sign in to comment.