Skip to content

Commit 1d30671

Browse files
authored
Retrieve remote model id from registration response in IT to avoid flaky (opensearch-project#3244)
Signed-off-by: zane-neo <[email protected]>
1 parent 78a304a commit 1d30671

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

plugin/src/test/java/org/opensearch/ml/rest/MLCommonsRestTestCase.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,15 +1002,11 @@ public String registerRemoteModel(String createConnectorInput, String modelName,
10021002
String connectorId = (String) responseMap.get("connector_id");
10031003
response = RestMLRemoteInferenceIT.registerRemoteModel(modelName, modelName, connectorId);
10041004
responseMap = parseResponseToMap(response);
1005-
String taskId = (String) responseMap.get("task_id");
1006-
waitForTask(taskId, MLTaskState.COMPLETED);
1007-
response = RestMLRemoteInferenceIT.getTask(taskId);
1008-
responseMap = parseResponseToMap(response);
10091005
String modelId = (String) responseMap.get("model_id");
10101006
if (deploy) {
10111007
response = RestMLRemoteInferenceIT.deployRemoteModel(modelId);
10121008
responseMap = parseResponseToMap(response);
1013-
taskId = (String) responseMap.get("task_id");
1009+
String taskId = (String) responseMap.get("task_id");
10141010
waitForTask(taskId, MLTaskState.COMPLETED);
10151011
}
10161012
return modelId;

0 commit comments

Comments
 (0)