Skip to content

Commit 7b12c74

Browse files
committed
adapts undeploy code change to multi-tenancy feature
Signed-off-by: Brian Flores <[email protected]>
1 parent a41b0ce commit 7b12c74

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

plugin/src/test/java/org/opensearch/ml/action/undeploy/TransportUndeployModelsActionTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ public void testDoExecute_undeployModelIndex_WhenNoNodesServiceModel() {
195195
.build();
196196

197197
doAnswer(invocation -> {
198-
ActionListener<MLModel> listener = invocation.getArgument(3);
198+
ActionListener<MLModel> listener = invocation.getArgument(4);
199199
listener.onResponse(mlModel);
200200
return null;
201-
}).when(mlModelManager).getModel(any(), any(), any(), isA(ActionListener.class));
201+
}).when(mlModelManager).getModel(any(), any(), any(), any(), isA(ActionListener.class));
202202

203203
doReturn(true).when(transportUndeployModelsAction).isSuperAdminUserWrapper(clusterService, client);
204204

@@ -226,7 +226,7 @@ public void testDoExecute_undeployModelIndex_WhenNoNodesServiceModel() {
226226

227227
String[] modelIds = new String[] { modelId };
228228
String[] nodeIds = new String[] { "test_node_id1", "test_node_id2" };
229-
MLUndeployModelsRequest request = new MLUndeployModelsRequest(modelIds, nodeIds);
229+
MLUndeployModelsRequest request = new MLUndeployModelsRequest(modelIds, nodeIds, null);
230230

231231
transportUndeployModelsAction.doExecute(task, request, actionListener);
232232

@@ -268,10 +268,10 @@ public void testDoExecute_noBulkRequestFired_WhenSomeNodesServiceModel() {
268268
.build();
269269

270270
doAnswer(invocation -> {
271-
ActionListener<MLModel> listener = invocation.getArgument(3);
271+
ActionListener<MLModel> listener = invocation.getArgument(4);
272272
listener.onResponse(mlModel);
273273
return null;
274-
}).when(mlModelManager).getModel(any(), any(), any(), isA(ActionListener.class));
274+
}).when(mlModelManager).getModel(any(), any(), any(),any(), isA(ActionListener.class));
275275

276276
doReturn(true).when(transportUndeployModelsAction).isSuperAdminUserWrapper(clusterService, client);
277277

@@ -293,7 +293,7 @@ public void testDoExecute_noBulkRequestFired_WhenSomeNodesServiceModel() {
293293

294294
String[] modelIds = new String[] { modelId };
295295
String[] nodeIds = new String[] { "test_node_id1", "test_node_id2" };
296-
MLUndeployModelsRequest request = new MLUndeployModelsRequest(modelIds, nodeIds);
296+
MLUndeployModelsRequest request = new MLUndeployModelsRequest(modelIds, nodeIds, null);
297297

298298
transportUndeployModelsAction.doExecute(task, request, actionListener);
299299

0 commit comments

Comments
 (0)