Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
Signed-off-by: Owais Kazi <[email protected]>
  • Loading branch information
owaiskazi19 committed Feb 17, 2024
1 parent 472bf22 commit 666d901
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ public void onResponse(MLDeployModelResponse mlDeployModelResponse) {
String resourceName = getResourceByWorkflowStep(getName());
String id = getResourceId(mlTask);
deployModelFuture.onResponse(
new WorkflowData(
Map.ofEntries(Map.entry(resourceName, id), Map.entry(MODEL_ID, mlTask.getModelId())),
currentNodeInputs.getWorkflowId(),
currentNodeId
)
new WorkflowData(Map.ofEntries(Map.entry(resourceName, id)), currentNodeInputs.getWorkflowId(), currentNodeId)
);
}, e -> { deployModelFuture.onFailure(new FlowFrameworkException(e.getMessage(), ExceptionsHelper.status(e))); })
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import static org.opensearch.action.DocWriteResponse.Result.UPDATED;
import static org.opensearch.flowframework.common.CommonValue.FLOW_FRAMEWORK_THREAD_POOL_PREFIX;
import static org.opensearch.flowframework.common.CommonValue.PROVISION_WORKFLOW_THREAD_POOL;
import static org.opensearch.flowframework.common.CommonValue.REGISTER_MODEL_STATUS;
import static org.opensearch.flowframework.common.CommonValue.WORKFLOW_STATE_INDEX;
import static org.opensearch.flowframework.common.CommonValue.WORKFLOW_THREAD_POOL;
import static org.opensearch.flowframework.common.WorkflowResources.MODEL_ID;
Expand Down Expand Up @@ -171,7 +170,6 @@ public void testDeployModel() throws ExecutionException, InterruptedException, I
verify(machineLearningNodeClient, times(1)).getTask(any(), any());

assertEquals(modelId, future.get().getContent().get(MODEL_ID));
assertEquals(status, future.get().getContent().get(REGISTER_MODEL_STATUS));
}

public void testDeployModelFailure() {
Expand Down

0 comments on commit 666d901

Please sign in to comment.